How to make the center point handle of the model coincide with the center point of the model itself
let objectzero = new BABYLON.TransformNode(āanchorā);
Is there a better way to use this that doesnāt fit my application scenario
Hi,
Iām gonna link this to:
Now what exactly is your issue with this solution? Iām not sure to understand your problem (sorry).
Understand that you would need to give us more details on why it doesnāt match your scenario. Else, I donāt think anybody will be able to just āguessā. A PG would be the best but else, try to at least expose us this scenario, like: How the meshes are sourced; What format they have; How you manage and implement them and What sort of transformation you (or the user) should be able to make.
Among all topics on this subject (if you did read them), there are already at least 4 solutions to this type of problem:
Solution 1: Edit the model in 3d-app and recenter axis
Solution 2: Use utility tool to process model and recenter axis
Solution 3: Transform the model in BJS and recenter axis
Solution 4 (the one I gave you): Use bounding box hierarchy to translate the center and parent to new.
Thereās even a fith solution where somebody created his own script (and shared it with us from his gh rep).
Itās hard for me to understand why none of these solutions (even with an adaptation) would be applicable to your use case. As I said, you would need to explain a bit further.
In case it helps, you can use setPivotPoint
to define the pivot point of your mesh.
True. I eventually forgot about this one. Thanks for the reminder . I might use it in my project instead of parenting.