villr Posted February 5, 2011 Share Posted February 5, 2011 I have a problem with the setobjectrotation code. I have a timer to set the rotation but it dont work. It just sets the rotation in 0seconds and thats not how i want it. I want it to set in maybe 3secs so it slowly moves. Here is code local rx,ry,rz = getElementRotation ( pirateship ) setTimer ( setElementRotation,3000,1,pirateship,rx, ry, rz-50 ) Someone know what the problem is? Link to comment
proracer Posted February 5, 2011 Share Posted February 5, 2011 Can you plz show more codes because this is just a mess in 2 lines. Link to comment
villr Posted February 5, 2011 Author Share Posted February 5, 2011 function getship () pirateship = getElementByID ( "pirateship" ) setTimer ( start, 5000, 1, pirateship ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), getship ) function start (pirateship) moveObject ( pirateship,40000,3304.4,-216, 12.5) setTimer( naarplaats, 41000, 1,pirateship) end function naarplaats(pirateship) local rx,ry,rz = getElementRotation ( pirateship ) setTimer ( setElementRotation,3000,1,pirateship,rx, ry, rz-50 ) end this is the code Link to comment
Aibo Posted February 5, 2011 Share Posted February 5, 2011 setElementRotation does not do any animation or anything. use moveObject with rotation parameters. Link to comment
Castillo Posted February 6, 2011 Share Posted February 6, 2011 Can you plz show more codes because this is just a mess in 2 lines. I actually don't see much point on your post. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now