PokéRogue
    Preparing search index...

    Interface Angular

    Provides methods used for setting the angular velocity, acceleration, and drag properties of an Arcade Physics Body.

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

    Implemented by

    Index
    • 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, in degrees per second squared.

      Returns this

      This Game Object.

    • 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, in degrees per second squared.

      Returns this

      This Game Object.

    • 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, in degrees per second.

      Returns this

      This Game Object.