Rotating and moving a box

ok heres my problem… what i want to do is create a rectangle on the screen… in an openGL window, in 2D. what i want to do is when i press forward the box will move in the direction its currently facing, then when i hit the left or right arrow keys, the box will rotate in that direction so that when i hit the up arrow again… the box will travel in whatever direction its currently facing. i’m sortof new at this, and would appreciate any comments or suggestions. basically i can draw the box no problem, and i think that i need to use the glRotatef() function to rotate it, but don’t know how to use it. i also have absolutely no idea how to move the box in the direction it’s currently facing.

also i am working strictly in 2D…

any sample code would be fantastic…


[This message has been edited by owen_holiday (edited 01-27-2004).]

try the rotating tut over at

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.