RealDocs

UCharacterMovementComponent::GetLastUpdateQuat

function Engine Since unknown
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: inlineconst

Description

Returns the character's rotation as a quaternion at the end of the last movement update tick.

Caveats & Gotchas

  • Not a UFUNCTION, so it isn't available to Blueprint — use GetLastUpdateRotation() (which returns an FRotator) for Blueprint-facing code.
  • Reflects the rotation as of the last completed movement tick, which can lag one frame behind the component's current rotation if something else moved the character since.

Signature

FQuat GetLastUpdateQuat() const { return LastUpdateRotation; }

Return Type

FQuat

Example

Comparing against current rotation C++
UCharacterMovementComponent* Movement = GetCharacterMovement();
const FQuat PreviousQuat = Movement->GetLastUpdateQuat();
const FQuat CurrentQuat = GetActorQuat();
if (!CurrentQuat.Equals(PreviousQuat))
{
    // Something rotated the character outside of the movement update
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.