AActor::K2_GetActorRotation
#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
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); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?