UPrimitiveComponent::SetCenterOfMass

Set the center of mass of a single body.

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/PrimitiveComponentPhysics.cpp

Syntax

void SetCenterOfMass
(
    FVector CenterOfMassOffset,
    FName BoneName
)

Remarks

Set the center of mass of a single body. This will offset the physx-calculated center of mass.

that in the case where multiple bodies are attached together, the center of mass will be set for the entire group.

Parameters

Parameter

Description

CenterOfMassOffset

User specified offset for the center of mass of this object, from the calculated location.

BoneName

If a SkeletalMeshComponent, name of body to set center of mass of. 'None' indicates root body.

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