Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Components > API/Runtime/Engine/Components/UPrimitiveComponent
- UPrimitiveComponent::GetSquaredDistanceToCollision()
- USkeletalMeshComponent::GetSquaredDistanceToCollision()
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Components/PrimitiveComponent.h |
| Include | #include "Components/PrimitiveComponent.h" |
| Source | /Engine/Source/Runtime/Engine/Private/PrimitiveComponentPhysics.cpp |
virtual bool GetSquaredDistanceToCollision
&40;
const FVector & Point,
float & OutSquaredDistance,
FVector & OutClosestPointOnCollision
&41; const
Remarks
Returns The square of the distance to closest Body Instance surface. true if a distance to the body was found and OutDistanceSquared has been populated
Parameters
| Name | Description |
|---|---|
| Point | World 3D vector |
| OutSquaredDistance | The squared distance to closest Body Instance surface. 0 if inside of the body |
| OutPointOnBody | Point on the surface of collision closest to Point |