screenCheck

open fun screenCheck(distance: Float, point: Vector2f): Boolean

Checks if a point is within a certain distance of the screen's edges; Used to avoid spawning particles or other effects that won't be seen by the player while impacting performances. The longer lived the effect is, the farther should be the cut-off distance

Return

Parameters

distance

Distance away from the edges of the screen, in screen width. A good default is 0.5f, or half a screen away from the edge. Can be shorter for short lived particles and such.

point

Location to check.