Phaser API Documentation

  Version: 
setAngularVelocity(bodies, value)

Description:

Sets the angular velocity of the bodies instantly. Position, angle, force etc. are 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.

value number

The angular velocity.

Returns:
Description:

This Matter Physics instance.

Since: 3.22.0