Navigation
Unreal Engine C++ API Reference > Runtime > Core > Math > FMath
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 void SphereDistToLine
&40;
FVector SphereOrigin,
float SphereRadius,
FVector LineOrigin,
FVector LineDir,
FVector & OutClosestPoint
&41;
Remarks
Find closest point on a Sphere to a Line. When line intersects Sphere, then closest point to LineOrigin is returned.
Parameters
Name | Description |
---|---|
SphereOrigin | Origin of Sphere |
SphereRadius | Radius of Sphere |
LineOrigin | Origin of line |
LineDir | Direction of line. Needs to be normalized!! |
OutClosestPoint | Closest point on sphere to given line. |