Skip to main content

ControllerFindClosestPoint

Callable

  • ControllerFindClosestPoint(point: [X: number, Y: number], points: [X: number, Y: number][], direction: Up | Right | Left | Down): number[]

  • Finds the closest point in a list, favoring the given direction.

    Used to navigate the active zones with a controller.


    Parameters

    • point: [X: number, Y: number]
    • points: [X: number, Y: number][]
    • direction: Up | Right | Left | Down

    Returns number[]