Jump to content
  • Advertisement


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


Rotating Double Doors

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

Hello, I am fairly new to openGL. I have 5 quads arranged in a specific order to look like a front of a building with double doors. I want to rotate the doors 90 degrees out so it looks like they are opening and closing. I have tried: glRotate(angle,0.0f,1.0f,0.0f) for each door, but it does not look like they are rotating from the hinges of the door, how would I rotate from the hinges of the door. thanks

Share this post

Link to post
Share on other sites

glTranslate (to the point of the hinge)
glRotate (fAngle_Y, 0.0f, 1.0f, 0.0f);


Draw the door (you might try drawing the door from the hinge out by that I mean hinge x = 0, lock x = max)



P.S. sorry if this is wrong I am currently a bit busy, it looks correct though.

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!