954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Rotating in OpenGL

Hi, I need some help with OpenGL and rotation.

I have a 3D door surrounded by a holder. The holder needs to move with the door and rotate when it's not on the floor. After that the door must be able to open without affecting the holder.

It's based on getting a door in Monsters Inc. I've uploaded this 15 second video so you can get the idea of what I'm trying to do:
http://www.youtube.com/watch?v=8HsEhHv6_Mo

Thanks in advance,

Stephen

stemiros
Newbie Poster
5 posts since Dec 2010
Reputation Points: 14
Solved Threads: 0
 

You need to abstract the problem wayyy past "Monsters Inc". You should ask the question generally so it helps the most people. Here are some details and specifics:

http://daviddoria.blogspot.com/2010/05/problem-abstraction-helping-others-help.html

Maybe something more like "I have two objects and I want to transform them together" or something like that. You should also post the code that you have tried that did not work and explain what is going wrong.

David

daviddoria
Posting Virtuoso
1,996 posts since Feb 2008
Reputation Points: 437
Solved Threads: 204
 

Thank you for that David, after reading your blog post I went to write a simple piece of code to demonstrate what was happening, and it turns out that I was using the glPushMatrix() and glPopMatrix() functions the wrong way round, and wasn't increasing the numbers I needed for rotation properly.

I will be sure to stick to your suggested explanation method next time.

Thanks again :)

Stephen

stemiros
Newbie Poster
5 posts since Dec 2010
Reputation Points: 14
Solved Threads: 0
 

stemiros,

Great! I'm glad it worked. This is a perfect exemplar of what I was talking about :) In the process of explaining your question in a way that others can understand, you clarified it to yourself and figured it out simultaneously!

Keep up the good work.

David

daviddoria
Posting Virtuoso
1,996 posts since Feb 2008
Reputation Points: 437
Solved Threads: 204
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: