Physics.P2.Body#onBeginContact

onBeginContact : Phaser.Signal

Dispatched when a first contact is created between shapes in two bodies.
This event is fired during the step, so collision has already taken place.

The event will be sent 5 arguments in this order:

The Phaser.Physics.P2.Body it is in contact with. This might be null if the Body was created directly in the p2 world.
The p2.Body this Body is in contact with.
The Shape from this body that caused the contact.
The Shape from the contact body.
The Contact Equation data array.

Source code: physics/p2/Body.js (Line 92)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.