Hi. I’m trying to figure out how to move around my 3d world and also place my object and move them independently of the camera…and also without using gluLookAt

Can anyone help ?

Precision : If you could enlighten me with how to use glPushMatrix and glPopMatrix and also what is the proper order to draw and transfom( rotate and translate ) object in the 3d world I would be pleased !

I need the logic of the camera and the object.

Thanks alot

Move the objects around with the ModelView matrix. glRotate, glTranslate and glScale.

Now your object are placed in the world-coordinate system.

Then put together a matrix that would represent the camera-object (ie. position of the camera negatively). Matrix 1 is the result.

Then get the rotation matrix of the camera. Transpose this matrix (orthogonal transpose = inverse) and the resulting one is Matrix 2.

Take Matrix2 * Matrix1 = Matrix 3.

Multiply Matrix 3 on the objects modelview matrix. There you go.

if u understand gluLookAt(…) then use it, youll pick up linear algebra with time.

btw carmack used a function called myGluLookAt(…) in quake1