MathUtilities.ClosestPointOnLineToPoint(Vector3, Vector3, Vector3) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get the closest point from a given point and an infinite line defined by two other points.
public static UnityEngine.Vector3 ClosestPointOnLineToPoint(UnityEngine.Vector3 point, UnityEngine.Vector3 linePointA, UnityEngine.Vector3 linePointB);
static member ClosestPointOnLineToPoint : UnityEngine.Vector3 * UnityEngine.Vector3 * UnityEngine.Vector3 -> UnityEngine.Vector3
Public Shared Function ClosestPointOnLineToPoint (point As Vector3, linePointA As Vector3, linePointB As Vector3) As Vector3
Parameters
- point
- UnityEngine.Vector3
- linePointA
- UnityEngine.Vector3
- linePointB
- UnityEngine.Vector3
Returns
UnityEngine.Vector3