Polarith AI
1.8

◆ ProjectPointOnLine()

static Vector3 ProjectPointOnLine ( Vector3  point,
Vector3  start,
Vector3  end,
bool  clamped = true 
)
static

Projects a given point onto a line.

The line is characterized by a start and end point. Optionally, the projected point can be clamped between the start and end point. For this to work, the additional parameter clamped needs to be set (which is the default).

Parameters
pointThe given point which has to be projected.
startThe start point of the line.
endThe end point of the line.
clampedIf true, the projected point is clamped.
Returns
The projected point.
Imprint