Phaser API Documentation

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

Description:

The Matter Physics Drag Event.

This event is dispatched by a Matter Physics World instance when a Pointer Constraint is actively dragging a body. It is emitted each time the pointer moves.

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

Parameters:

name type description
body MatterJS.BodyType

The Body that is being dragged. This is a Matter Body, not a Phaser Game Object.

constraint Phaser.Physics.Matter.PointerConstraint

The Pointer Constraint that is dragging the body.

Since: 3.16.2