Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UCharacterMovementComponent
Description
Compute a target rotation based on current movement. Used by PhysicsRotation() when bOrientRotationToMovement is true. Default implementation targets a rotation based on Acceleration.
| Name | ComputeOrientToMovementRotation |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/CharacterMovementComponent.h |
| Include Path | #include "GameFramework/CharacterMovementComponent.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp |
virtual FRotator ComputeOrientToMovementRotation
(
const FRotator & CurrentRotation,
float DeltaTime,
FRotator & DeltaRotation
) const
The target rotation given current movement.
Parameters
| Name | Remarks |
|---|---|
| CurrentRotation | Current rotation of the Character |
| DeltaTime | Time slice for this movement |
| DeltaRotation | Proposed rotation change based simply on DeltaTime * RotationRate |