Hi everyone,
I’m trying to get the z axis from matrix 4x4 matrix using the getCol3 method of the class but it doesn’t seem to give me what I want
Here’s a test:
from panda3d.core import Mat4
mat = Mat4(0.98511, -0.0449334, -0.165952, 0, -0.0449334, 0.864408, -0.500779, 0, 0.165952, 0.500779, 0.849518, 0, 0, 0, 0, 1)
print('Mat')
print(mat)
for i in range(3):
print('Col {}'.format(i))
print(mat.getCol3(i))
Mat
0.98511 -0.0449334 -0.165952 0
-0.0449334 0.864408 -0.500779 0
0.165952 0.500779 0.849518 0
0 0 0 1
Col 0
LVecBase3f(0.98511, -0.0449334, -0.165952)
Col 1
LVecBase3f(-0.0449334, -0.165952, 0)
Col 2
LVecBase3f(-0.165952, 0, -0.0449334)