getOverlapX(body1, body2, overlapOnly) → {float}
Calculates the horizontal overlap between two Bodies and sets their properties accordingly, including:touching.left
, touching.right
and overlapX
.
Parameters
Name | Type | Description |
---|---|---|
body1 | Phaser.Physics.Arcade.Body | The first Body to separate. |
body2 | Phaser.Physics.Arcade.Body | The second Body to separate. |
overlapOnly | boolean | Is this an overlap only check, or part of separation? |
Returns
float -
Returns the amount of horizontal overlap between the two bodies.
- Source code: physics/arcade/World.js (Line 1331)
Please login to continue.