I’m using ammo.js to create a physics imposter just like it is detailed here:
And can be seen on the playground here:
My issue is that as can be seen in the example,the positioning of the child imposter is done manually:
var boxCollider = BABYLON.Mesh.CreateBox(“box1”, 0.3, scene);
boxCollider.position.y = -0.13;
boxCollider.position.z = -0.13;
So whenever I change the scale of the parent skull mesh, I can’t seem to dynamically set this value. Changing the size of the skull will cause the demo to misbehave.
So my question: is there a way to set the position of the child box collider dynamically so it will be in the same relative place(at the bottom of the mesh)?
Thank you for any help.