PointerDragBehavior doesn't apply position to physics objects

If you open this PG and drag the ball. You will see the ball does drag but the physics aggregate stays behind.

I’m not sure if this is by design or not. I don’t see why it cant apply the dragged pos onto the physics world. I was making this same behaviour via raycasts but have trouble mimicking the same draggable behaviour, mainly dragging a mesh over thin air.

Let me know if this is a bug/missing feature or if there is a better way to drag and move meshes with physics applied.

Ok so doing more research and things get crazy.

I found this post; How to reapply physics after dragging mesh? and in it they do have drag behaviour working BUT they are using ammoJS and imposters. In my Havok example, I am using PhysicsBody and Shape…
See it kinda working with Imposters (but not perfect)

Updating a physics body’s position from the associated mesh’s position is disabled by default to save on computation time, but you can enable it by setting body.disablePreStep = false: Mouse Dragging Physics Bodies | Babylon.js Playground (babylonjs.com) (line 54)

1 Like