intersectLine

fun intersectLine(line: Line3, target: Vector3, clampToLine: Boolean = true): Vector3?

Writes the intersection point of the passed line and the plane into target. Returns null if the line does not intersect. Returns the line's starting point if the line is coplanar with the plane.

Return

The intersection point, or null if no intersection is detected.

Parameters

line

The line to compute the intersection for.

target

The target vector that is used to store the method's result.

clampToLine

Whether to clamp the intersection to the line segment.