View Full Version : Camera issues
LordOfTheUniverse
12-19-2002, 11:54 AM
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.
Relic
12-20-2002, 01:23 AM
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).]
LordOfTheUniverse
12-20-2002, 03:26 AM
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;
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.