Navigation
Unreal Engine C++ API Reference > Runtime > Engine > PhysicsEngine > UBodySetup
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/PhysicsEngine/BodySetup.h |
Include | #include "PhysicsEngine/BodySetup.h" |
Source | /Engine/Source/Runtime/Engine/Private/PhysicsEngine/BodySetup.cpp |
float GetClosestPointAndNormal
&40;
const FVector & WorldPosition,
const FTransform & BodyToWorldTM,
FVector & ClosestWorldPosition,
FVector & FeatureNormal,
bool bUseConvexShapes
&41; const
Remarks
Finds the closest point in the body setup. Input and outputs are given in world space. NOTE: This function ignores trimesh data The distance between WorldPosition and the body setup. 0 indicates WorldPosition is inside one of the shapes.
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 body setup to WorldPosition |
FeatureNormal | The normal of the feature associated with ClosestWorldPosition |
bUseConvexShapes | When true also check the convex shapes if any (false by default) |