How to make the center point handle of the model coincide with the center point of the model itself

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).

1 Like

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 :hugs:. I might use it in my project instead of parenting.