Game Development Community

Matrix transformations

by Sean H. · in Torque Game Engine · 07/13/2005 (9:12 am) · 3 replies

Im trying to do a 2d rotation using a transformation matrix but the calculations not coming out as I expect it.

here's what i'm trying to do:

|0-1 0| |0|=|-1|
|1 0 0| |1|=|0|
|0 0 1| |1|=|1|

here's what im doing:
$test="0 1 0 -1 0 0 0 0 1"
$vec="0 1 1";
$res=matrixmulvector($test,$vec);

ive tried numerous times and I cannot get the correct result.
is this the proper way to represent a matrix?

#1
07/13/2005 (11:31 am)
Bump* any suggestions?
#2
07/13/2005 (1:28 pm)
Hi Sean,

Sorry, I'm not totally clear what you are trying to do. Could you try giving some more information? I can tell your trying to rotate an object, just not clear what end result you are going after.

Thanks!
-Drew
#3
07/14/2005 (8:32 am)
Ok i figured out the problem. after playing with the numbers, i realized i need to use the quat format for matrices.