BTW, enabling the CCD doesn’t solve the problem with collision detection completely. Just imagine we have a fast moving body (like bullet) with moves towards a wall. When bullet’s speed becomes really high, it can go through the wall and therefore no ‘collisionstart’ event is fired. After enabling CCD on the bullet, it starts colliding the wall properly, but I still don’t see any ‘collisionstart’ events fired
The same happens when FPS drops below 15-20 and the distance traveled by the bullet per frame is big enough. Bodies collide but without firing any events.
That indeed sounds like a bug or a Bullet system not implemented in Ammo.js/Playcanvas.
As a temporary solution, if performance allows it, I would try doing a raycast per frame and check the distance threshold to invoke manually a collision event.
I would agree. For bullets, I’d use raycasts!
Out of curiosity, @Igor, are you using the ‘legacy’ physics, or does your project have the new WebAssembly based version of ammo.js?
Yeah, raycasting could be a solution, pretty rough though. Thanks guys!
To @will: we faced the bug in both legacy and WebAssembly builds.