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

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

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

Comments
Solved his own problem and reported back the solution - good work!

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

This question has already been answered. Start a new discussion instead.