Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/PhysicsEngine > API/Runtime/Engine/PhysicsEngine/FKBoxElem
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/PhysicsEngine/BoxElem.h |
| Include | #include "PhysicsEngine/BoxElem.h" |
| Source | /Engine/Source/Runtime/Engine/Private/PhysicsEngine/BodySetup.cpp |
float GetClosestPointAndNormal
&40;
const FVector & WorldPosition,
const FTransform & BodyToWorldTM,
FVector & ClosestWorldPosition,
FVector & Normal
&41; const
Remarks
Finds the closest point on the shape given a world position. Input and output are given in world space The distance between WorldPosition and the shape. 0 indicates WorldPosition is inside the shape.
Parameters
| Name | Description |
|---|---|
| WorldPosition | The point we are trying to get close to |
| BodyToWorldTM | The transform to convert BodySetup into world space |
| ClosestWorldPosition | The closest point on the shape in world space |
| Normal | The normal of the feature associated with ClosestWorldPosition. |