# Thread: I don't like glRotate and glTranslate hehehe :)

1. ## I don't like glRotate and glTranslate hehehe :)

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 ?

2. ## Re: I don't like glRotate and glTranslate hehehe :)

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

3. ## Re: I don't like glRotate and glTranslate hehehe :)

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.

4. ## Re: I don't like glRotate and glTranslate hehehe :)

if u understand gluLookAt(..) then use it, youll pick up linear algebra with time.
btw carmack used a function called myGluLookAt(..) in quake1

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•