Cylinder goes through box, using Ammo.js

Hi @bamsarker and Welcome to the forum!

With high velocities, collision detection can be missed. Usually, when it happens you have to increase the steps so the detection is more reliable.

I’ve modified your PR : https://playground.babylonjs.com/#20S53U#5
first, I set the ammojsplugin to support delta for world steps
then, I removed the max steps and I’ve added a call to setSubTimeStep as explained here : Use Advanced Physics Features - Babylon.js Documentation
Basically, if you have 16.6 ms between 2 frames and have a subTimeStep of 1ms, it will compute 16 steps. This will be more accurate.

6 Likes