Hello,
I am currently using the rotateAroundPivot function from this doc https://doc.babylonjs.com/toolsAndResources/utilities/Pivot
to basically rotate a mesh around a pivot just like you would do in 3ds max or in blender.
Everything works fine, except if the mesh already is rotated in an Axis, which is not the same Axis you pass to the function.
This is the result on using rotateAroundPivot on a non rotated mesh:

Everything works fine here.
And this is the result on using rotateAroundPivot on an already rotated mesh:

In this example, I am trying to rotate the mesh around a pivot in the Z axis. The mesh was rotated in y Axis beforehand.
And as you can see, the mesh suddenly has an offset in its local z position.
Here’s the PG: https://playground.babylonjs.com/#851PUZ#4
Hoping for this to get fixed quickly, as I can not figure out how to use the pivot/parenting system in BabylonJS, as it is not the same as in 3d modelling programs such as blender/3ds max.
I’ve stated what I am trying to achieve in this post: https://forum.babylonjs.com/t/set-pivot-point-parent-without-changing-mesh-position/44164/2,
so if anyone could help me figure out how to achieve that without using the function, that would be just as fine!
Thanks!