PokéRogue
    Preparing search index...

    Interface Immovable

    Provides methods for controlling whether an Arcade Physics Body is immovable during collisions. An immovable body will not be moved or separated when it collides with other bodies, making it ideal for static obstacles, walls, platforms, or any object that should never be displaced by physics interactions. This component is mixed into Game Objects that use Arcade Physics.

    interface Immovable {
        setImmovable(value?: boolean): this;
    }

    Implemented by

    Index
    • Sets if this Body can be separated during collisions with other bodies.

      When a body is immovable it means it won't move at all, not even to separate it from collision overlap. If you just wish to prevent a body from being knocked around by other bodies, see the setPushable method instead.

      Parameters

      • Optionalvalue: boolean

        Whether this body should be immovable (true) or movable (false) during collisions. Default true.

      Returns this

      This Game Object.