Rotation of several objects around y-axis

Started by
4 comments, last by Gage64 15 years, 9 months ago
Hi! I'm trying to manage to rotate several object around the same axis. Like they are part of a circle. _____ | | ___ | | | | _ | | | | |_| | | |___| |____| The objects should move around the y axis, always with the image facing the camera. Unfortunately I can't find any good formula for this. Is this done using only glTranslatef(...) ?? Thanks
Well I just want to join so I can get som help.
Advertisement
Maybe this article will help you.
glRotatef()??
Tiago.MWeb Developer - Aspiring CG Programmer
If you create a scenegraph, you can put all your objects into the scene as a child node of a transformation node that you rotate. When you render, just strip out the rotational matrix in your 4x4 modelview matrix to cause each object to face the camera while it moves around the Y axis.
Sound wonderful but how do you do this?
Are there any good examples, tutorials to look at?

I have looked here at gamedev but without success.

Please help!
Well I just want to join so I can get som help.
I think something like this should work:

glRotatef(angle, 0, 1, 0);glTranslatef(...);glRotatef(-angle, 0, 1, 0);


Read this to learn more about how transformations work in OpenGL, especially the section "Thinking About Transformations".

This topic is closed to new replies.

Advertisement