Unreal Engine 5 · Blueprint → C++
Get Actor Location and Rotation in Unreal Engine 5 C++UE Docs
The Blueprint Get Actor Location and Get Actor Rotation nodes map to GetActorLocation() and GetActorRotation() in C++. They return the actor's world-space FVector position and FRotator orientation.
Blueprint node & C++ equivalent
FVector Location = GetActorLocation();
FRotator Rotation = GetActorRotation();What do the Get Actor Location and Rotation nodes do?
These nodes read an actor's current world-space transform. Get Actor Location returns its position and Get Actor Rotation returns its orientation. In C++ they are the GetActorLocation and GetActorRotation member functions on AActor.
How to use them in C++
Call FVector Location = GetActorLocation(); to read the position and FRotator Rotation = GetActorRotation(); to read the orientation. Both query the actor's root component in world space. These pair naturally with SetActorLocation and SetActorRotation when you want to read, modify, and reapply a transform.
Frequently asked questions
What does GetActorLocation return in UE5?+
It returns an FVector with the actor's world-space position, taken from its root component.
What is the difference between GetActorRotation and GetActorForwardVector?+
GetActorRotation returns the orientation as an FRotator, while GetActorForwardVector returns a unit FVector pointing in the actor's facing direction derived from that rotation.