Skip to main content
Version: Phaser v4.0.0

Phaser.Physics.Arcade.Components.Immovable

Scope: static

Source: src/physics/arcade/components/Immovable.js#L7
Since: 3.0.0

Static functions

setImmovable

<instance> setImmovable([value])

Description:

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:

nametypeoptionaldefaultdescription
valuebooleanYestrueWhether this body should be immovable (true) or movable (false) during collisions.

Returns: Phaser.Physics.Arcade.Components.Immovable - This Game Object.

Source: src/physics/arcade/components/Immovable.js#L18
Since: 3.0.0