Game Development Community

TGEA Coordinate system

by Jeremiah Fulbright · in Torque Game Engine Advanced · 12/29/2007 (10:23 am) · 5 replies

I am curious what Coordinate System TGEA implements, since in TGE it was previously OpenGL renderer, so things might be a bit different now.

LeftHand (+X = Right, +Y = Up, +Z = Forward)

or

RightHand (+X = Right, +Y = Up, +Z = Backwards/Towards Object)

#1
12/29/2007 (11:01 am)
It uses a rotated right-handed coordinate system (+X = Right, +Y = forward, +Z = up).
#2
12/29/2007 (11:07 am)
I should have pointed out one more thing...

The projection matrix applies a rotation and negates the z-axis in order to convert to a left-handed system.

So, you have to be very careful with rotations for objects that are going to be projected into screen space and those that aren't (the first uses left-handed rotations and the second uses right).

Todd


edit for a typo
#3
12/29/2007 (3:53 pm)
Okay, that makes some sense...

In the case of a transform, what columns would represent forward and up. Position comes off of 3, but I'm not super familiar with a majority of the matrix math.
#4
12/29/2007 (6:07 pm)
Hey Jeremiah,

Column 0 = x-axis = right
Column 1 = y-axis = forward
Column 2 = z-axis = up

Todd


edited for correctness
#5
12/29/2007 (9:39 pm)
Ah, great.. thanks so much