Jump to content

How to rotate object (spawned with gmes)


aneco

Recommended Posts

thanks for your answer.

  
  
function rotate(source, key, keyState) 
    if key =="mouse_wheel_up" then 
        rx,ry,rz = getObjectRotation(object) 
        setObjectRotation ( object, rx,ry,rz - 5 ) 
    end 
    if key =="mouse_wheel_down" then 
        rx,ry,rz = getObjectRotation(object) 
        setObjectRotation ( object, rx,ry,rz + 5) 
    end 
  
  
    bindKey(playerSource, "mouse_wheel_up", "down", rotate) 
    bindKey(playerSource, "mouse_wheel_down", "down", rotate) 
  
  
  
  
  
  

i made function like this but i dont know where i need to put this into resource.

sorry for my bad english.

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