Phaser API Documentation

  Version: 
Filter
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Namespace: Immovable
Phaser.Physics.Arcade.Components.Immovable

Methods

setImmovable([value])
Focus
Focus

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:

name type arguments Default description
value boolean <optional> true

Sets if this body will be separated during collisions with other bodies.

Returns:
Description:

This Game Object.

Examples:
Since: 3.0.0
Focus
Focus