Matter.js Constant Collision Detection (CCD) Fix?

I just got a notification about a new update to matter.js that needs testing…

I'm not sure if it helps Tumult Hype, but issue #5 is listed in the notes. That's one of the oldest issues with matter.js — Prevent object passing through walls / tunneling (implement CCD) — and Hype has that problem too, as Hype uses matter.js as the Physics engine.

1 Like

Unfortunately I don't think this is a general solution to the passing-through-walls issue. This introduces substepping for the default Runner, which is used for non-programmatic controlled timing. So:

  • Substepping just improves the problem by adding more physic body updates per frame and hopefully catching a collision. Fast moving objects/thin walls will still be an issue.

  • Hype always used its own programmatic control of the physics engine update. We just did 60fps (vs the substepping example uses 600 fps), so we could theoretically use this technique to improve, but the new code specifically doesn't help. That said, it does look like there might have been other improvements that make substepping more efficient, so now this might be a viable technique to still help the problem (also CPUs are faster now...)

1 Like