Collision and Mesh Intersection is not registered/taken into account when the object is moving too fast

For one of my games, some objects are moving very fast. In particular situations, I need to check if those objects are colliding or intersecting other objects.

I noticed that sometimes, the mesh1.intersectsMesh(mesh2,true) method is not always trigger since it is moving too fast.

Also, even if my objects have a physicsImpostor attached to them, they sometimes go right throught them…

Is there a way to fix that? Thanks

cc @Cedric as I think it is a common issue with collision across engine with various tricks to workaround it :slight_smile:

Ammojs supports continuous collision detection IIRC.
Other solutions:

  • doing a raycast corresponding to the distance done per frame
  • doing an intersection test with a mesh that is as long as the distance per frame
  • use physics substeps

I’ve found a lot of threads in the forum (I won’t link them all here) with the search ccd or continuous collision detection.
Maybe one thread will mention a use case that is close to your need.

1 Like

Thanks a lot!

1 Like