Unreal Engine 5 · Blueprint → C++
Set Actor Location in Unreal Engine 5 C++
The Blueprint Set Actor Location node maps to SetActorLocation(FVector NewLocation) in C++. Pass an FVector world-space position to move the actor's root to that location.
Blueprint node & C++ equivalent

AActor* ExampleActor;
FVector NewLocation;
ExampleActor->SetActorLocation(NewLocation);What does the Set Actor Location node do?
Set Actor Location moves an actor's root component to an absolute world-space position. In C++ you call SetActorLocation on an AActor* and pass an FVector holding the new X, Y, and Z coordinates.
How to use it in C++
Given an AActor* ExampleActor and an FVector NewLocation, call ExampleActor->SetActorLocation(NewLocation);. The actor snaps to that position unless you supply additional arguments. The full signature also accepts an optional bSweep flag and a hit result, letting it stop against blocking geometry instead of teleporting through it.
Set Actor Location replaces the position outright. To move relative to the current position instead, use AddActorWorldOffset or AddActorLocalOffset.
Frequently asked questions
What is the C++ function for Set Actor Location in UE5?+
It is AActor::SetActorLocation(FVector NewLocation). Call it on your actor pointer and pass the world-space position you want.
How do I make SetActorLocation collide instead of teleport?+
Use the overload with bSweep set to true, which sweeps the actor to the target and stops it against blocking collision rather than passing through.