Phaser API Documentation

  Version: 
setVelocityY(bodies, y)

Description:

Sets just the vertical linear velocity of the physics bodies. The horizontal velocity of the body is unchanged.

Parameters:

name type description
bodies Phaser.Types.Physics.Matter.MatterBody | Array.<Phaser.Types.Physics.Matter.MatterBody>

Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world.

y number

The vertical linear velocity value.

Returns:
Description:

This Matter Physics instance.

Since: 3.22.0