I have a small problem with rotations especially the position of the pivot point. It should be quite obvious for most of you but my brain can’t figure it out.
You can see I have 3 meshes, 2 of them are extruded, 1 is a box. What I need to do is rotate around the X axis so the polygon is facing the camera, then rotate on Z axis. The box (grey) has the correct behavior, but it’s because I didn’t rotate it on the X axis prior to the Z axis. The purple polygon is also rotating as expected (Z axis), again because I didn’t rotate it on the X axis. On the other hand, the blue polygon seems to have it’s pivot point far from it’s center, and after rotating it on X axis, the rotation on Z axis is unintended. I Can reproduce this behavior with a box as long as I place it in a position where it needs to be rotated on X prior to Z.
I have tried setPivot or setPivotMatrix without any success. It seems the rotation point for Z is not centered on my mesh.
What am I doing wrong ?