Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FKSphylElem
Description
Finds the shortest distance between the element and a world position. Input and output are given in world space
| Name | GetShortestDistanceToPoint |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/PhysicsEngine/SphylElem.h |
| Include Path | #include "PhysicsEngine/SphylElem.h" |
| Source | /Engine/Source/Runtime/Engine/Private/PhysicsEngine/BodySetup.cpp |
float GetShortestDistanceToPoint
(
const FVector & WorldPosition,
const FTransform & BodyToWorldTM
) const
The distance between WorldPosition and the shape. 0 indicates WorldPosition is inside one of the shapes.
Parameters
| Name | Remarks |
|---|---|
| WorldPosition | The point we are trying to get close to |
| BodyToWorldTM | The transform to convert BodySetup into world space |