RealDocs

ACharacter::GetBaseRotationOffset

function Engine Since 4.6
#include "GameFramework/Character.h"
Access: public Specifiers: virtualconst

Description

Returns the cached rotation offset of the mesh from the capsule rotation as a quaternion. This offset is established at initialization by CacheInitialMeshOffset.

Caveats & Gotchas

  • Returns a quaternion, not a rotator — convert with .Rotator() or use GetBaseRotationOffsetRotator() for Blueprint-friendly access.
  • The value reflects the offset at the time CacheInitialMeshOffset was last called; if the mesh has been moved since without re-caching, this will be stale.
  • Network smoothing interpolates the mesh toward capsule + this offset; changing the mesh offset without calling CacheInitialMeshOffset will cause the mesh to drift back to the old offset position.

Signature

virtual FQuat GetBaseRotationOffset() const { return BaseRotationOffset; }

Return Type

FQuat

Example

Apply the cached rotation offset manually C++
FQuat CapsuleQuat = GetCapsuleComponent()->GetComponentQuat();
FQuat MeshQuat = CapsuleQuat * GetBaseRotationOffset();
GetMesh()->SetWorldRotation(MeshQuat);

Version History

Introduced in: 4.6

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.