Hello everyone, this is the first time I submit a bug on the forum, my English is not very good, please forgive me.
I encountered a problem, when I rotate the mesh, and then setPivotPoint to a world coordinate, the mesh will be displaced. You can reproduce the problem here: https://playground.babylonjs.com/#FRZR0N#1
By the way, there is also a small problem here, when I don’t call mesh.getAbsolutePosition(), I can’t get the world coordinates of pivotPoint through mesh.getAbsolutePivotPoint(). Is this intentional?
Thanks for your help!
It seems to have solved the problem now, but I still have some questions I want to ask for your help.
Do I need to call computeWorldMatrix after every move of the mesh, or once before setPivotPoint?
Also I don’t quite understand why this code box.position = box.position.add(box.position.subtract(box.getAbsolutePosition())); can’t be replaced with box.position = box.getAbsolutePosition().clone();?