Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/GameFramework > API/Runtime/Engine/GameFramework/UCharacterMovementComponent
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/GameFramework/CharacterMovementComponent.h |
| Include | #include "GameFramework/CharacterMovementComponent.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp |
UFUNCTION (BlueprintCallable, Category="Pawn|Components|CharacterMovement")
virtual void SetGravityDirection
(
const FVector & GravityDir
)
Remarks
Set a custom, local gravity direction to use during movement simulation. The gravity direction must be synchronized by external systems between the autonomous and authority processes. The gravity direction will be corrected as part of movement corrections should the movement state diverge. SetGravityDirection is responsible for initializing cached values used to tranform to from gravity relative space.
Parameters
| Name | Description |
|---|---|
| GravityDir | A non-zero vector representing the new gravity direction. The vector will be normalized. |