Namespace: Angular

Phaser.Physics.Arcade.Components. Angular

Provides methods used for setting the angular acceleration properties of an Arcade Physics Body.

Since: 3.0.0
Source: src/physics/arcade/components/Angular.js (Line 7)

Methods


setAngularAcceleration(value)

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.

Since: 3.0.0
Source: src/physics/arcade/components/Angular.js (Line 36)
Returns:

This Game Object.

Type
Phaser.Physics.Arcade.Components.Angular

setAngularDrag(value)

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.

Since: 3.0.0
Source: src/physics/arcade/components/Angular.js (Line 57)
Returns:

This Game Object.

Type
Phaser.Physics.Arcade.Components.Angular

setAngularVelocity(value)

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.

Since: 3.0.0
Source: src/physics/arcade/components/Angular.js (Line 15)
Returns:

This Game Object.

Type
Phaser.Physics.Arcade.Components.Angular