Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Math > API/Runtime/Core/Math/FMath > API/Runtime/Core/Math/FMath/PointDistToLine
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include | #include "Math/UnrealMathUtility.h" |
| Source | /Engine/Source/Runtime/Core/Private/Math/UnrealMath.cpp |
static float PointDistToLine
&40;
const FVector & Point,
const FVector & Direction,
const FVector & Origin,
FVector & OutClosestPoint
&41;
Remarks
Calculates the distance of a given Point in world space to a given line, defined by the vector couple (Origin, Direction). distance of Point from line defined by (Origin, Direction)
Parameters
| Name | Description |
|---|---|
| Point | Point to check distance to line |
| Direction | Vector indicating the direction of the line. Not required to be normalized. |
| Origin | Point of reference used to calculate distance |
| OutClosestPoint | optional point that represents the closest point projected onto Axis |