All examples · Physics · As Markdown, for AIs

Triggers and contacts

What this example shows

Crates fall through a sensor band and report it themselves: red before, yellow inside, green after. Every body has onEnter and onExit, which call back with the other object, so you can ask whether it was the checkpoint or just another crate.

sensor: true makes a collider detect without resolving: things pass straight through. And listening with onEnter is what turns contact reporting on: a body nobody listens to costs nothing.

Starting
Starting
—