UPrimitiveComponent::GetDistanceToCollision

Returns Distance to closest Body Instance surface.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/PrimitiveComponent.h

Include

#include "Components/PrimitiveComponent.h"

Syntax

float GetDistanceToCollision
(
    const FVector & Point,
    FVector & ClosestPointOnCollision
) const

Remarks

Returns Distance to closest Body Instance surface.

Returns

Success if returns > 0.f, if returns 0.f, point is inside the geometry If returns < 0.f, this primitive does not have collsion or if geometry is not supported

Parameters

Parameter

Description

Point

World 3D vector

OutPointOnBody

Point on the surface of collision closest to Point

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss