orientation matrix

Ok, so I did my research on orientation matrices and wikipedia says the 3x3 matrix is composed of 3 vectors one for each Axis and one axis is one Column in the matrix.

like this:

x, y, z
x, y, z
x, y, z

So my question is, is this correct in blender python? (like in cont.owner.localOrientation) I seem to remember someone telling me it was different in blender python.

and if it’s not correct where can I get the Z axis in a blender python 3x3 orientation matrix returned from localOrientation?

nevermind. I should have searched better first:

http://www.cgmasters.net/free-tutorials/bge-python-reading-and-writing-rotation/

this will solve my problems.

except… I’m now getting an error AttributeError: ‘list’ object has no attribute ‘to_euler’

which means it wont work for me.

http://www.tutorialsforblender3d.com/GameModule/MathutilsModule_3_8.html

got it. this works, tested it and now things are awesome.