RealDocs

AActor::K2_GetActorRotation

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

Description

Returns the world-space rotation of the actor's RootComponent as an FRotator. Exposed to Blueprint as 'Get Actor Rotation'.

Caveats & Gotchas

  • For pawns, this rotation has pitch zeroed out because pawn rotation does not track pitch by default — use GetActorEyesViewPoint for a rotation that includes pitch.
  • In C++, GetActorRotation() is the conventional alias; K2_GetActorRotation is an inline wrapper around GetActorQuat().Rotator() and produces the same result.

Signature

FRotator K2_GetActorRotation() const

Return Type

FRotator

Examples

Copy this actor's rotation to a target actor on BeginPlay Blueprint
Event BeginPlay Set Actor Rotation Target is Actor Target New Rotation Teleport false Get Actor Rotation Target is Actor Return Value Target Actor Target Actor Target Actor
Edit Blueprint graph Copy this actor's rotation to a target actor on BeginPlay
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Use rotation to spawn a projectile facing the actor C++
FRotator Rot = GetActorRotation();
FVector Forward = Rot.Vector();
GetWorld()->SpawnActor<AMyProjectile>(ProjectileClass, GetActorLocation() + Forward * 50.f, Rot);

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.