   Right-handed coordinate system
  Hi,in a right-handed coordinate system, for example working with OpenGL, would you initialize the rotation matrix associated to each object as:1  0  00  1  00  0 -1?Supposing the user wants to move forward (relative to the camera direction), would you do:NewCameraPosition = Camera.Rotation * Vector(0,0,-1) ?Therefore, is (0,0,-1) the default forward direction (relative to a local coordinate system)?I would do what I said, but I'm not sure about it because I've never seen some opengl code where a (0,0,-1) vector is associated to the forward direction..Thanks!   
Quote:Original post by Luca DHi,in a right-handed coordinate system, for example working with OpenGL, would you initialize the rotation matrix associated to each object as:1  0  00  1  00  0 -1?No. Why? What makes you think that matrix represents a valid rotation? (It doesn't.)Quote:Supposing the user wants to move forward (relative to the camera direction), would you do:NewCameraPosition = Camera.Rotation * Vector(0,0,-1) ?Sure, you can do that.Quote:Therefore, is (0,0,-1) the default forward direction (relative to a local coordinate system)?(0,0,-1) is the into-the-screen direction for OpenGL with identity transformation matrices.   ;Quote:The default coordinate system in OpenGL(TM) is right-handed: the positive x and y axes point right and up, and the negative z axis points forward. Positive rotation is counterclockwise about the axis of rotation.source: http://www.evl.uic.edu/ralph/508S98/coordinates.html;Quote:Supposing the user wants to move forward (relative to the camera direction), would you do:NewCameraPosition = Camera.Rotation * Vector(0,0,-1) ?That really doesn't move your position forward.Try something like this:NewCameraPosition = OldCameraPosition + (NormalizedCameraDirectionVector * DistanceToMove);[Edited by - theequal on June 16, 2009 1:31:39 AM]