ElevationFilter

Checks vertical height interval overlaps (elevation). Prevents projectiles or actors from colliding if their elevation intervals do not overlap.

Constructor

new ElevationFilter()

Methods

(static) overlaps(elevation1, height1, elevation2, height2) → {boolean}

Check if two elevation intervals overlap.

Parameters:
NameTypeDefaultDescription
elevation1number0

Base elevation of entity 1

height1number1

Height span of entity 1

elevation2number0

Base elevation of entity 2

height2number1

Height span of entity 2

Returns:
Type: 
boolean