Physics Joint with large impulse or physics hand

Hello,

When I apply a (not so large) impulse on an imposter, the mesh got thrown away by the impulse and thrown back to its constrained position like a spring!

The same thing happens when I enter VR and interact with the object by the physics hand. Tested by both CannonJS and AmmoJS

Can I do anything about this (keep violet box connected to the blue box) without watching and forcing the position each frame / step?

Playground link: https://playground.babylonjs.com/#KA2IA6#2

Behaviour with small impulse:

small

Behaviour with large impulse

large

Thanks,

cc @Cedric

Thanks @carolhmj

I managed to reproduce in Playground, hope it helps to identify the problem

Sorry but I don’t think we can do something about this issue.
It’s inherent to the way physics engines work. They try to find a solution that fits the problem. But as soon as the values are too big, it breaks.
It more or like like having a fast body thrown to a wall. With a fast enough value, the body will be on one side for a frame, and on the other side the frame after.
There is no continuity past some critical values.
You can try to mitigate the issue by having smaller sub steps.

Thanks for your reply @Cedric

Do you have any suggestion for physics hands (and very large impulse consequently IIUC) Should the constraints be handled by the physics engine or they have to be handled manually for each degree of freedom within each frame, or a hybrid approach?

Thank you,

Thanks

Physics engines trade accuracy for performance. I don’t think it’s easily doable to change it. I would try changing substeps and limit the values based on tests in playground.

Thanks, it does help!

1 Like