RealDocs

AActor::GetActorLocation

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

Description

Returns the current world-space location of the actor's root component. This is equivalent to `GetRootComponent()->GetComponentLocation()` if a root component exists.

Caveats & Gotchas

  • Returns FVector::ZeroVector if there is no root component.
  • For actors that are frequently queried, cache the result rather than calling repeatedly within the same frame — each call goes through the transform hierarchy.
  • To get the actor's local-space pivot offset, use GetActorRelativeLocation() instead; GetActorLocation() always returns world space.

Signature

FVector GetActorLocation() const

Return Type

FVector

Examples

Move the actor upward every tick by adding to its current location Blueprint
Set Actor Location Target is Actor Target New Location Return Value Event Tick Delta Seconds Delta Seconds vector + vector A B Return Value Return Value Get Actor Location Target is Actor Return Value Make Vector X 0.0 Y 0.0 Z 10.0 Return Value Return Value
Edit Blueprint graph Move the actor upward every tick by adding to its current location
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Getting actor location C++
FVector Loc = SomeActor->GetActorLocation();
UE_LOG(LogTemp, Log, TEXT("Actor is at %s"), *Loc.ToString());

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.