Camera issues

How to make camera reflect changes
in my object’s orientation.

I have matrix attached to my object,
which i use to feed glMultMatrix().

I want camera to roll/pitch/yaw/move as my object does.

There’s no “camera” in OpenGL.
Apply the inverse rotation to the rest of the world (at the top of the transformation hierarchie).
This will give a first person shooter or flight sim look.

[This message has been edited by Relic (edited 12-20-2002).]

Only rotation, or also translation?

When I made it in a way like this:

rotate(XYZ) > modelMatrix;
translate > modelMatrix;

transpose(modelMatrix) > InvmodelMatrix

and when drawing:

glLoadIdentity();

glMultMatrix(InvModelMatrix);
gluLookAt(distance, 0,0,
0, 0, 0,
0, 1, 0);

scene…

glPushMatrix()
glMultMatrix(modelMatrix);
glPopMatrix();

I received only a small stripe of scene across window,
everything else was black;