Tracks entities currently colliding with a fixture. More...
| Import Statement: | import Clayground.Physics |
CollisionTracker maintains a set of entities currently in contact with a monitored fixture and emits signals when contacts begin or end.
Example usage:
import Clayground.Physics CollisionTracker { fixture: player.fixture debug: true onBeginContact: (entity) => { if (entity.objectName === "ground") player.onGround = true } onEndContact: (entity) => { if (entity.objectName === "ground") player.onGround = false } }
The fixture to monitor for collisions.
Set of entities currently in collision with the fixture.
Shows debug visualization markers on colliding entities.
Emitted when an entity enters collision with the fixture.
Emitted when an entity leaves collision with the fixture.