Left handed to Right handed?

Started by
1 comment, last by promo 22 years, 4 months ago
Hi all. OpenGL is a left-handed system (or right-handed.. can''t remember). that means that when you load the identity matrix you are staring into the negative Z axis. That''s fine, but if I take the "Look" vector from the ModelView matrix (column 3) I would get (0, 0, 1) which is the vector to the POSITIVE Z axis. so, when I want to move the player forward, in fact I have to move him in the direction opposite to the "look" vector. this causes ugly code, bugs, and other side effects in my 3d engine. am I right or wrong? if I''m right, is there a way to setup OpenGL so that loading the identity matrix would point me to the positive Z axis? Thanks. -------------------- I believe I think, therefor I believe I am
--------------------I believe I think, therefor I believe I am
Advertisement
What you call the look vector from the model view matrix is not the direction you are looking at, it''s the direction of the positive Z-axis in the current local coordinate system.

The idendity matrix is the matrix "that does nothing". And because OpenGL defines forward as along the negative Z, and you should be able to multiply any vertex by the identity matrix without transforming it, you get this, let me say, "problem".

And by the way, OpenGL is right handed.

Actually, I find this whole "OpenGL is right-handed" belief kind of strange. OpenGL is quite agnostic when it comes to handedness.. its all in how you setup your projection matrix.

xyzzy

This topic is closed to new replies.

Advertisement