The line segment, or ray, to check. If a ray, set the isRay parameter to true.
A single polygon, or array of polygons, to check.
OptionalisRay: booleanIs line a ray or a line segment? Default false.
Optionalout: Vector4A Vector4 to store the intersection results in.
Checks for the closest point of intersection between a line segment and an array of polygons.
If no intersection is found, this function returns
null.If intersection was found, a Vector4 is returned with the following properties:
The
xandycomponents contain the point of the intersection. Thezcomponent contains the closest distance. Thewcomponent contains the index of the polygon, in the given array, that triggered the intersection.