gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > rotation speed

#7242 - hnager - Fri Jun 13, 2003 2:22 am

hey there - i have a a set of polygon (2d) functions one of which uses sin/cos lookups to rotate the coordinates of a polygon and then draws a line from point to point. THe rotation works great, but is way too fast.

As a test of the function I put the rotation function in a while loop in main(). I'm using WaitForVSync() to hopefully keep things from running too fast, but it still spins faster than I can even see it! I thought that WaitForVSync() would give me a framerate of 60 fps and it would then take 6 seconds for the polygon to roatte with the angle incremented every frame...is that not true?

#7243 - hnager - Fri Jun 13, 2003 2:25 am

answered my own post - i shouldnt have been incrementing the angle passed to the function - it's a 'rotateby' as opposed to 'rotateto'.