PokéRogue
    Preparing search index...

    Provides methods for setting the mass of an Arcade Physics Body. This component is mixed into Game Objects that use Arcade Physics. Mass influences how bodies respond to collisions: a heavier body will exert more force on a lighter one, affecting the resulting velocity changes during impact resolution.

    interface Mass {
        setMass(value: number): this;
    }

    Implemented by

    Index
    • Sets the mass of the physics body. Mass affects collision response -- heavier bodies push lighter ones more during collisions.

      Parameters

      • value: number

        The new mass of the body. Must be a positive number.

      Returns this

      This Game Object.