How to Use Position Gizmo with Rigid Box?

I attached a PositionGizmo to a sphere in the scene, and I’m having trouble figuring out how to correctly use the gizmo to manipulate the position of a rigid box mesh. Could anyone please guide me through the correct approach or point out what I’m missing in the code?

Here is my Playground: https://playground.babylonjs.com/#WS39W5#1

A physics body with a mass of 0 is static. Setting it to a value >1 will make it dynamic.
Then enable prestep to update physics properties from scene transform TRS. PhysicsBody | Babylon.js Documentation

var sphereAggregate = new BABYLON.PhysicsAggregate(sphere, BABYLON.PhysicsShapeType.SPHERE, { mass: 1, restitution:0.75}, scene);
sphereAggregate.body.disablePreStep = false;
2 Likes

Thank you!

1 Like