Jump to content



Moving objects with user input

  • You cannot reply to this topic
No replies to this topic

#1 AltarofScience   Members   -  Reputation: 104

Like
0Likes
Like

Posted 09 February 2012 - 10:14 AM

I know that there are functions which can spin a shape on its axes and you can stop it with user input from a key.
How do I set a key to move an object?
Like, click u and the object moves up a fixed distance over time. Like it moves up 1 on the graph if you click u, but over time like a sprite in game maker or something.
Do I need something besides opengl and some libraries to do this? glTranslate moves where an object first appears if you change a value before launching, so could I just change the initial value in that function somehow?



nvm. I found this amazing thing that helped me. just took some more work with my googlefu.

Ad:





We are working on generating results for this topic
PARTNERS