PDA

View Full Version : gluLookAt problems



LordOfTheUniverse
12-03-2002, 02:14 PM
Hi,
How to feed projection matrix , so that gluLookAt
points at the center of a certain object - this object
has 4x4matrix attached to it (updated by its translations/ rotations).
I tried
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMultMatrixf(TranspodesModelMatrix4x4);
gluLookAt(distance, 0, 0
, 0 ,0, 0,
0, 1, 0);
and went on with modelview matrix;

ae97004
12-03-2002, 08:19 PM
Hi,

Im not sure what your problem is, but it would be easily accomplished if you just pointed the lookat by using the proper matrix array elements which are valid for the translations and use those to point

gluLookAt(..., Matrix[X trans],Matrix[Ytrans] etc..) this is the easiest way to accomplish what i think your asking for, is it what you need to know..

ae97004

Hi,
How to feed projection matrix , so that gluLookAt
points at the center of a certain object - this object
has 4x4matrix attached to it (updated by its translations/ rotations).
I tried
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMultMatrixf(TranspodesModelMatrix4x4);
gluLookAt(distance, 0, 0
, 0 ,0, 0,
0, 1, 0);
and went on with modelview matrix;