Jump to content

Objeto giro constante


Lalalu

Recommended Posts

Hooola que tals, hago este post porque tengo un pequeño problema con un script ¿cómo podría hacer para que un objeto que está pegado al cuerpo gire o rote constántemente? 

        local objeto = createObject(1598, x, y, z, 0, 0, 0)	
        exports.bone_attach:attachElementToBone(objeto, l_74_0, 12, 0, 0.04 , 0.1)

traté con esto, pero no funciono :/

		moveObject ( objeto, 2000, x+5, y+5, z, 0, 0,500 )

 

Edited by Lalalu
Link to comment
local objeto = createObject(1598, x, y, z, 0, 0, 0)	
exports.bone_attach:attachElementToBone(objeto, l_74_0, 12, 0, 0.04 , 0.1)
addEventHandler("onClientRender", root,
	local _, _, r = getElementRotation(objeto)
	if r == 360 then
		r = 0
	end
	setElementRotation(objeto, 0, 0, math.min(r + 1, 360))
)

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...