Game Development Community

Simple newbie question...

by Bryant R Cannon · in Torque Game Engine · 06/14/2007 (1:31 am) · 2 replies

I'm not quite understanding how rotation data is stored... I notice four numbers: x, y, z, and... a? I'm trying to write a first script involving rotation, and I'm not sure what numbers to change. Please explain. Thanks.

About the author

Recent Threads


#1
06/14/2007 (2:14 am)
Typically x, y and z relate to an objects position in world space or an object's transform - left/right, front/back and up/down.
#2
06/14/2007 (4:04 am)
My understanding is... (even if this isn't exactly correct, it gets the gist of it)

x, y, z, and amount of rotation

0 0 1 90 would turn an object to one side 90 degrees
0 0 -1 90 would turn it the opposite direction 90 degrees
1 0 0 90 would turn the object to face the sky
1 0 1 90 would turn the object 90 degrees to one side, and 90 degrees to face the sky