Is this the correct way to add collider to an imported mesh?
BABYLON.SceneLoader.ImportMeshAsync("", "./public/", "jengaPiece.glb", scene).then((result) => {
const jengaPiece = result.meshes[0];
jengaPiece.position = new BABYLON.Vector3(0, 5, 0);
new BABYLON.PhysicsAggregate(jengaPiece, BABYLON.PhysicsShapeType.BOX, { mass: 1, restitution: 0.5, friction: 0.2 }, scene);
});
I am asking because it falls down (the physics work) but collider behaves weird, it sinks into ground and rotates and bounces around.