UCharacterMovementComponent::ComputeOrientToMovementRotation

Compute a target rotation based on current movement.

Windows
MacOS
Linux

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

Syntax

virtual FRotator ComputeOrientToMovementRotation
(
    const FRotator & CurrentRotation,
    float DeltaTime,
    FRotator & DeltaRotation
) const

Remarks

Compute a target rotation based on current movement. Used by PhysicsRotation() when bOrientRotationToMovement is true. Default implementation targets a rotation based on Acceleration.

Returns

The target rotation given current movement.

Parameters

Parameter

Description

CurrentRotation

Current rotation of the Character

DeltaTime

Time slice for this movement

DeltaRotation

Proposed rotation change based simply on DeltaTime * RotationRate

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