Jump to content
  • Advertisement
Sign in to follow this  
AoS

OpenGL Moving objects with user input

This topic is 2497 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!