UPrimitiveComponent::ComputePenetration

Computes the minimum translation direction (MTD) when an overlap exists between the component and the given shape.

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "Components/PrimitiveComponent.h"

Source

/Engine/Source/Runtime/Engine/Private/Components/PrimitiveComponent.cpp

Syntax

virtual bool ComputePenetration
(
    FMTDResult & OutMTD,
    const FCollisionShape & CollisionShape,
    const FVector & Pos,
    const FQuat & Rot
)

Remarks

Computes the minimum translation direction (MTD) when an overlap exists between the component and the given shape.

Returns

true if the computation succeeded - assumes that there is an overlap at the specified position/rotation

Parameters

Parameter

Description

OutMTD

Outputs the MTD to move CollisionShape out of penetration

CollisionShape

Shape information for the geometry testing against

Pos

Location of collision shape

Rot

Rotation of collision shape

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