Function rayIntersectPoly

Ray intersection with a polygon or polyline

  • Parameters

    • pts: Vec2[]

      The points of the polygon or polyline

    • closed: boolean

      Whether the shape is closed (true for polygon, false for polyline)

    • p: Vec2

      A point

    • v: Vec2

      A vector

    Returns Vec2

    The intersection point