UPrimitiveComponent::GetSquaredDistanceToCollision

Returns The square of the distance to closest Body Instance surface.

Windows
MacOS
Linux

Override Hierarchy

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

Syntax

virtual bool GetSquaredDistanceToCollision
(
    const FVector & Point,
    float & OutSquaredDistance,
    FVector & OutClosestPointOnCollision
) const

Remarks

Returns The square of the distance to closest Body Instance surface.

Returns

true if a distance to the body was found and OutDistanceSquared has been populated

Parameters

Parameter

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

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