Physics.P2.Body#removeCollisionGroup()

removeCollisionGroup(group, clearCallback, shape)

Removes the given CollisionGroup, or array of CollisionGroups, from the list of groups that this body will collide with and updates the collision masks.

Parameters
Name Type Argument Default Description
group Phaser.Physics.CollisionGroup | array

The Collision Group or Array of Collision Groups that this Bodies shapes should not collide with anymore.

clearCallback boolean <optional>
true

Clear the callback that will be triggered when this Body impacts with the given Group?

shape p2.Shape <optional>

An optional Shape. If not provided the updated collision mask will be added to all Shapes in this Body.

Source code: physics/p2/Body.js (Line 371)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.