FBodyInstance::GetDistanceToBody

Get the square of the distance to the body surface if available It is only valid if BodyShape is convex If point is inside or shape is not convex, it will return 0.f

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/PhysicsEngine/BodyInstance.h

Include

#include "PhysicsEngine/BodyInstance.h"

Source

/Engine/Source/Runtime/Engine/Private/PhysicsEngine/BodyInstance.cpp

Syntax

float GetDistanceToBody
(
    const FVector & Point,
    FVector & OutPointOnBody
) const

Remarks

Get the square of the distance to the body surface if available It is only valid if BodyShape is convex If point is inside or shape is not convex, it will return 0.f

Parameters

Parameter

Description

Point

Point in world space

OutPointOnBody

Point on the surface of body 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