Jump to content

setobjectrotation


villr

Recommended Posts

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
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

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...