Jump to content

Help me script rotate objects !


Ryosuke

Recommended Posts

Hello, I would like to ask for the help to create a system to rotate an object when I hold a certain button , It will only stop after I release 

objectRotation = 0;
 objeto = createObject ( 1852,2714,-1756.2700195313,77.559997558594, 0, 0, 0 )
function func ()
 objectRotation = objectRotation + 1.20
 setElementRotation(objeto, 0, 0, objectRotation)
 end
 function func2 ()
 objectRotation = objectRotation  - 1.20
 setElementRotation(objeto, 0, 0, objectRotation)
 end
 bindKey ( "2", "down", func2 )
 bindKey ( "3", "down", func )

 

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