USkeletalMeshComponent::GetClosestPointOnPhysicsAsset

Given a world position, find the closest point on the physics asset.

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "Components/SkeletalMeshComponent.h"

Source

/Engine/Source/Runtime/Engine/Private/SkeletalMeshComponentPhysics.cpp

Syntax

bool GetClosestPointOnPhysicsAsset
(
    const FVector & WorldPosition,
    FClosestPointOnPhysicsAsset & ClosestPointOnPhysicsAsset,
    bool bApproximate
) const

Remarks

Given a world position, find the closest point on the physics asset. Note that this is independent of collision and welding. This is based purely on animation position

Returns

true if we found a closest point

Parameters

Parameter

Description

WorldPosition

The point we want the closest point to (i.e. for all bodies in the physics asset, find the one that has a point closest to WorldPosition)

ClosestPointOnPhysicsAsset

The data associated with the closest point (position, normal, etc...)

bApproximate

The closest body is found using bone transform distance instead of body distance. This approximation means the final point is the closest point on a potentially not closest body. This approximation gets worse as the size of Bodies gets bigger.

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