Archived

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

doodah2001

Rotation of a plane (as in airplane)

Recommended Posts

Ok, here''s my problem. I''m using open GL and I''ve created a simple airplane using triangles. I''ve got the wings and everything. However, when I try to rotate it so that the tail is near the top pointing towards the upper left hand corner and the nose is pointing down towards the lower right hand corner using glRotate, it doesn''t work. What numbers would I need to manipulate to make this happen. Currently my angle is set at 45. It just rotates the whole plane 45 degrees. Then when I try to manipate the other cooridinates, x, y, z, it just moves it that amount in the window. In other words, you are still looking directly at the nose of the plane and can''t see the main body at all. I hope this isn''t too confusing. Thanks for your help. Mat

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It is difficult to understand what the problem is but here is some pseudo code:

pushMatrix
translateIt
rotateIt
displayIt
popMatrix

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Switched translate and rotate and it worked. Thanks.

Share this post


Link to post
Share on other sites