Phaser API Documentation

  Version: 
separate(body1, body2, [processCallback], [callbackContext], [overlapOnly], [intersects])

Description:

Separates two Bodies.

Parameters:

name type arguments description
body1 Phaser.Physics.Arcade.Body

The first Body to be separated.

body2 Phaser.Physics.Arcade.Body

The second Body to be separated.

processCallback ArcadePhysicsCallback <optional>

The process callback.

callbackContext * <optional>

The context in which to invoke the callback.

overlapOnly boolean <optional>

If this a collide or overlap check?

intersects boolean <optional>

Assert that the bodies intersect and should not be tested before separation.

Returns:
Description:

True if separation occurred, otherwise false.

Type:
  • boolean
Since: 3.0.0