Moving the "Camera"

#1, Camera is in quotes because i know there isn’t a camera persay… but im having some rotate/translate “issues”
Alright… My problem is, im making a simple program to rotate/translate the camera, to get a good look at an object. When i translate the object (backward 2 units lets say) it is then 2 units off the origin, which gives me a COMPLETELY different effect when i rotate. Is there a way to have the origin to go with the object? so that Rotating is completely separate from translating? Rotating along the X would then have the same effect from the origin, or the same effect if i had moved the object back like 5000 units. Anyone?

Maybe you want to use this:

luLookAt(Pos.X, Pos.Y, Pos.Z,
Dir.X, Dir.Y, Dir.Z,
Up.X, Up.Y, Up.Z);

Pos holds the coords of your eye so to speak, Dir is where you are looking at and for Up the values (0, 1, 0) hardly ever change.

Hope it helps.

[This message has been edited by B_old (edited 12-19-2002).]

Try spherical coordinate system,
take spherical coords of EyeX, EyeY, EyeZ,
and add 90degrees to elevation.
This solves case for rotations arount Z and Y; How to add third rotation I don’t know