phaser - v4.0.0-rc.4
    Preparing search index...

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

    interface Angular {
        setAngularAcceleration(value: number): this;
        setAngularDrag(value: number): this;
        setAngularVelocity(value: number): this;
    }

    Implemented by

    Index

    Methods

    • 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

      • value: number

        The amount of angular acceleration.

      Returns this

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

      Parameters

      • value: number

        The amount of drag.

      Returns this

    • 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

      • value: number

        The amount of angular velocity.

      Returns this