RealDocs

APawn::GetBaseAimRotation

function Engine Blueprint Since 4.0
#include "GameFramework/Pawn.h"
Access: public Specifiers: virtualUFUNCTIONBlueprintCallableconst

Description

Returns the aim rotation for the pawn. For player-controlled pawns this is the camera rotation; for AI-controlled pawns this is the pawn's own rotation. Used as the base rotation for animation blending and weapon spread.

Caveats & Gotchas

  • The split between player (uses controller rotation) and AI (uses actor rotation) means the same function returns meaningfully different data depending on controller type — be explicit about which you need if mixing controller types in a game mode.
  • On non-locally-controlled pawns in a multiplayer game, the pitch portion of the returned rotation is reconstructed from the compressed RemoteViewPitch16 field, so it has limited precision (~0.0055 degree steps).

Signature

virtual FRotator GetBaseAimRotation() const

Return Type

FRotator

Examples

Sync actor body rotation to aim direction each tick Blueprint
Event Tick Delta Seconds Delta Seconds Get Base Aim Rotation Target is Pawn Target Return Value Set Actor Rotation Target is Actor Target New Rotation Teleport Physics Teleport Physics false false Return Value
Edit Blueprint graph Sync actor body rotation to aim direction each tick
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Drive animation aim offset from base aim rotation C++
FRotator AimRot = Pawn->GetBaseAimRotation();
FRotator ActorRot = Pawn->GetActorRotation();
FRotator Delta = (AimRot - ActorRot).GetNormalized();
// Delta.Pitch drives the vertical aim offset blend space

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.