Skip to content

Arcade Physics: Immovable Object Moves when it has circular collision #7054

@hunkydoryrepair

Description

@hunkydoryrepair

Version

  • Phaser Version: 3.88.0 - 3.88.2
  • Operating system: Mac OS and Windows
  • Browser: Chrome/all

Description

An immovable object with circular collision will move when an object with rectangular collision collides with it.
This is inconsistent with all earlier versions, and with rectangular objects.
In order to prevent an object from moving in 3.88.1, the body must be set to immovable, and have pushable explicitly set to false AND the object colliding with it must be pushable.

Example Test Code

in comments. the behavior is clear in the separateCircle function of world.js. When object is immovable but pushable, it moves it.

Additional Information

The behavior is USEFUL, but an unnecessary breaking change, and inconsistent with other shapes. setImmovable could set pushable to false, and require it be explicitly enabled, which should prevent it from being a breaking change.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions