Phaser API Documentation

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

Description:

The Matter Physics Collision Active Event.

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

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

Parameters:

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

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.