Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/USkeletalMeshComponent
Description
Enables or disables gravity for the given bone. NAME_None indicates the root body will be edited. If the bone name given is otherwise invalid, nothing happens.
| Name | SetEnableBodyGravity |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/SkeletalMeshComponent.h |
| Include Path | #include "Components/SkeletalMeshComponent.h" |
| Source | /Engine/Source/Runtime/Engine/Private/SkeletalMeshComponentPhysics.cpp |
UFUNCTION (BlueprintCallable, Category="Physics")
void SetEnableBodyGravity
(
bool bEnableGravity,
FName BoneName
)
Parameters
| Name | Remarks |
|---|---|
| bEnableGravity | Whether gravity should be enabled or disabled. |
| BoneName | The name of the bone to modify. |