Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Components > API/Runtime/Engine/Components/UPrimitiveComponent
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 |
FVector GetCenterOfMass
&40;
FName BoneName
&41; const
Remarks
Get the center of mass of a single body. In the case of a welded body this will return the center of mass of the entire welded body (including its parent and children) Objects that are not simulated return (0,0,0) as they do not have COM
Parameters
| Name | Description |
|---|---|
| BoneName | If a SkeletalMeshComponent, name of body to get center of mass of. 'None' indicates root body. |