Phaser API Documentation

  Version: 
<static> GetOverlapY(body1, body2, overlapOnly, bias)

Description:

Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties accordingly, including: touching.up, touching.down, touching.none and `overlapY'.

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?

bias number

A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding).

Returns:
Description:

The amount of overlap.

Type:
  • number
Since: 3.0.0