Phaser API Documentation

  Version: 
Filter
Namespace: Angular
Phaser.Physics.Arcade.Components.Angular

Methods

setAngularVelocity(value)
Focus
Focus

Description:

Sets the angular velocity of the body.

In Arcade Physics, bodies cannot rotate. They are always axis-aligned. However, they can have angular motion, which is passed on to the Game Object bound to the body, causing them to visually rotate, even though the body remains axis-aligned.

Parameters:

name type description
value number

The amount of angular velocity.

Returns:
Description:

This Game Object.

Since: 3.0.0
Focus
Focus
setAngularAcceleration(value)
Focus
Focus

Description:

Sets the angular acceleration of the body.

In Arcade Physics, bodies cannot rotate. They are always axis-aligned. However, they can have angular motion, which is passed on to the Game Object bound to the body, causing them to visually rotate, even though the body remains axis-aligned.

Parameters:

name type description
value number

The amount of angular acceleration.

Returns:
Description:

This Game Object.

Since: 3.0.0
Focus
Focus
setAngularDrag(value)
Focus
Focus

Description:

Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration.

Parameters:

name type description
value number

The amount of drag.

Returns:
Description:

This Game Object.

Since: 3.0.0
Focus
Focus