I'm using matter.js as a physics engine, and I see that I can detect collisions.
However, I cannot figure out how to tell if two bodies are in contact with one another after a collision occurs. Is there any way to do this?
(In my particular case, I want a ball to jump only if it's touching a particular piece of ground.)
Events.on(this.engine, 'collisionActive', function (event) { });
to handle library's collision event. Useevent.pairs
to get two bodies and check id attribute to determine specific bodies. Here's an example. – Corin