Hello,
I’m having trouble getting some vector maths to work. I’m not sure what I’m doing wrong below…
I have a normalized Y vector which I want to maintain (ay), a preferred Z vector (0,0,1) and I want to find a rotation matrix.
My strategy is…
az=mathutils.Vector((0,0,1))
ax=ay.cross(az) #should give me a vector perpendicular to y and the up vector
az=ax.cross(ay) #should give me a new up vector which is 90 degrees to both x and y
m=mathutils.Matrix((ax,ay,az))
Where am I going wrong here?
Thanks!