API

Function raycast

  • Cast a 'walkability' ray on the navmesh from start to end. Matches BJS Addons semantics: hit is true only when 0 < t < 1 and hitPoint is the linear interpolation between start and end at parameter t.

    Recast's raycast ignores the y component of the end position (2D check).

    Parameters

    Returns { hit: boolean; hitPoint?: Vec3 }