A option that a lot of people use is to not move the camera but move the whole world to simulate the camera.
Here is an example of how move around my world.
glRotatef(WrotateX, 1.0f, 0.0f, 0.0f); rotate world
glRotatef(WrotateY, 0.0f, 1.0f, 0.0f);
glRotatef(WrotateZ, 0.0f, 0.0f, 1.0f);
glTranslatef( 0,0, Worldz); Translate world
glTranslatef(My_Object[(int)j].Curent_point.xyz[0], My_Object[(int)j].Curent_point.xyz[1], My_Object[(int)j].Curent_point.xyz[2]); Translate object in world.
glRotatef(My_Object[(int)j].Rotation_x, 1.0f, 0.0f, 0.0f); Rotate object
glRotatef(My_Object[(int)j].Rotation_y, 0.0f, 1.0f, 0.0f);
glRotatef(My_Object[(int)j].Rotation_z, 0.0f, 0.0f, 1.0f);
Draw_Object();
Originally posted by Penance:
[b]I’m interested in orbiting the ‘camera’ aroud my objects. I know there is gluLookAt, but I am not sure how this is used (i mean i know there are 9 parameters and what each of them is more or less, i just don’t know how or where to insert the function into my code!)
basically what I’m trying to acheive is to have the camera be above my objects and to the side (looking down at them) and then have the camera move in a circle around my objects. So it would be like looking at the objects and walking in a circle around them.
Any input or tips appreciated as always.[/b]