Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.



This topic is 6269 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

Quick question on timing. I simply just want to draw a 2D quad on the screen. I want to make it slide in to the center of the screen from the right. what would i do to the 4 values of the quad to make it achieve this over a period of 2 seconds? =] Jer

Share this post

Link to post
Share on other sites
well you pop open your high school physics book to find that:

v = d/t

say d = 100units or something and t=2
the v = 50u/s

well, know you need to find the change in time, deltaT, since the last frame...i''ll let you figure that one out(check the other threads concerning Frame Rate)

know if your using something like OpenGL do something like:

deltaD += v * deltaT;
glTranslatef(deltaD,0.0f,0.0f); // since you wanted to move right

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!