Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UBodySetup
Description
Finds the shortest distance between the body setup and a world position. Input and output are given in world space NOTE: This function ignores trimesh data
| Name | GetShortestDistanceToPoint |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/PhysicsEngine/BodySetup.h |
| Include Path | #include "PhysicsEngine/BodySetup.h" |
| Source | /Engine/Source/Runtime/Engine/Private/PhysicsEngine/BodySetup.cpp |
float GetShortestDistanceToPoint
(
const FVector & WorldPosition,
const FTransform & BodyToWorldTM,
bool bUseConvexShapes
) const
The distance between WorldPosition and the body setup. 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 |
| bUseConvexShapes | When true also check the convex shapes if any (false by default) |