Phaser API Documentation

  Version: 
Event: COLLISION_START
Phaser.Physics.Matter.Events.COLLISION_START
COLLISION_START

Description:

The Matter Physics Collision Start Event.

This event is dispatched by a Matter Physics World instance after the engine has updated. It provides a list of all pairs that have started to collide in the current tick (if any).

Listen to it from a Scene using: this.matter.world.on('collisionstart', listener).

Parameters:

name type description
event Phaser.Physics.Matter.Events.CollisionStartEvent

The Collision Event object.

bodyA MatterJS.BodyType

The first body of the first colliding pair. The event.pairs array may contain more colliding bodies.

bodyB MatterJS.BodyType

The second body of the first colliding pair. The event.pairs array may contain more colliding bodies.