World vs relative transforms¶
World space answers "where is this in the level?" Relative space answers "where is this compared to its parent?" Attachment is the moment that difference stops being academic.
The one-minute version¶
- A transform is location, rotation, and scale bundled together.
- Unreal's world axes are: X forward, Y right, Z up.
- World space is the level's coordinate system. A world location of
(100, 0, 0)means 100 Unreal units along the world's X axis from the world origin. - Relative space is measured from a parent component or actor. A relative
location of
(100, 0, 0)means 100 units along the parent's local X axis. - Actors are moved through their root component. Components can have parents, so they usually have both a relative transform and a world transform.
Set Actor Locationuses world space.Set Relative Locationuses the target component's parent space.Set World Locationsets a component's world position and changes its relative value to make that happen.- Attachment changes the parent relationship. That can change what the same relative numbers mean.
Sweepmeans "try to move through collision and stop on a blocking hit." Without sweep, location-setting nodes can place something through or into walls if collision does not block the final placement.
The coordinate system¶
Unreal uses a left-handed, Z-up coordinate system:
X+ = forward
Y+ = right
Z+ = up
Those directions are world directions until you ask about an actor or component that has its own rotation. If a character turns 90 degrees to the right, the character's local forward is no longer the same direction as the world's X+ axis.
That is the first split:
World X+ = the level's forward axis
Actor X+ = this actor's forward axis after its rotation
Component X+ = this component's forward axis after parent transforms
When a tutorial says "add forward * distance," always ask: forward according to what?
World space¶
World space is the coordinate system for the whole level. Its origin is the world origin, and its axes do not rotate because your actor turned around.
Use world space when you mean:
- put an actor at this exact point in the level;
- spawn something at a socket's world transform;
- line trace from camera world location to camera world location plus forward;
- compare two actors' positions;
- move a character to a checkpoint transform in the map.
Example:
TargetActor Set Actor Location
New Location = (1000, 300, 120)
That asks for the actor's root to end up at that world location. It does not mean "move 1000 units in front of the actor."
Relative space¶
Relative space is measured from a parent. For components, the parent is another scene component. For an attached actor, the actor's root component has an attach parent.
Example component tree:
flowchart TD
Character[BP_PlayerCharacter Actor]
Root[CapsuleComponent<br/>root]
Mesh[SkeletalMeshComponent<br/>relative to capsule]
CameraBoom[SpringArmComponent<br/>relative to capsule]
Camera[CameraComponent<br/>relative to boom]
Character --> Root
Root --> Mesh
Root --> CameraBoom
CameraBoom --> Camera
If the camera's relative location is (0, 0, 0), that means "at the spring
arm's end/attachment point," not "at the world origin." If the spring arm
rotates, the camera's world transform changes even if the camera's relative
numbers do not.
Relative values are how component hierarchies work:
Child world transform = parent world transform combined with child relative transform
You do not need the matrix math to use the idea. The parent moves, rotates, or scales; the child follows because the child's transform is stored as an offset from that parent.
Actor transform vs component transform¶
An actor's visible transform comes from its root component. That is why actor-level movement nodes talk about the actor, but the real scene hierarchy is component-based.
Useful split:
| Thing | Has transform? | Beginner meaning |
|---|---|---|
| Actor | Through its root component | The whole placed/spawned thing. |
| Scene Component | Yes | A transformable part or attach point. |
| Static/Skeletal Mesh Component | Yes | Visible component that can be attached/moved. |
| Actor Component | No scene transform by itself | Logic/data component, not a placed point. |
| UObject | No scene transform by itself | Plain object/data/system object. |
If a node targets an Actor, expect it to affect the root component. If a node targets a Scene Component, expect it to affect that component within the component hierarchy.
Set Actor Location vs Set Relative Location¶
These names look similar, but they answer different questions.
| Node | Target | Space | Use when |
|---|---|---|---|
| Set Actor Location | Actor | World | Move the actor's root to a world location. |
| Set Actor Relative Location | Actor | Parent space of the actor's root component | Move an attached actor relative to its attach parent. |
| Set World Location | Scene Component | World | Put a component at a world location and let Unreal update its relative offset. |
| Set Relative Location | Scene Component | Parent space | Move a component by changing its offset from its parent. |
For an unattached actor, Set Actor Location and Set Actor Relative Location
can look the same because the root has no meaningful moving parent. The
difference becomes obvious after attachment:
Sword attached to CharacterMesh hand socket
Set Actor Location (Sword)
-> move sword root to this world point
Set Actor Relative Location (Sword)
-> change sword root offset from the hand socket/parent
For components:
CameraComponent Set Relative Location = (0, 0, 50)
-> camera sits 50 units above its parent in parent space
CameraComponent Set World Location = (0, 0, 50)
-> camera tries to sit at world Z 50, whatever relative offset that requires
What attachment changes¶
Attachment creates a parent/child transform relationship. The attached actor or component starts following the parent, and its relative transform becomes an offset from that parent.
The attach rule decides what happens at the instant of attachment:
| Rule | Meaning at attach time |
|---|---|
| Keep World | Stay where you are in world space; compute a new relative offset under the parent. |
| Keep Relative | Keep the current relative numbers; world position may jump under the new parent. |
| Snap to Target | Match the parent/socket for that transform channel. |
That is why a held item can jump, stretch, or rotate oddly when attached. The problem is often not the attach itself; it is the rule you chose for location, rotation, or scale.
See Attach Actor To Component for the full attach-node breakdown.
"Spawn it in front of me"¶
This beginner task is where world and local space usually collide.
The shape is:
SpawnLocation = ActorWorldLocation + ActorForwardVector * Distance
Read that carefully:
ActorWorldLocationis a world-space point.ActorForwardVectoris a world-space direction that comes from the actor's current rotation.Distanceis a scalar length.- The result is a world-space point you can feed to
Spawn Actor from Class.
If you instead add (500, 0, 0) to the actor's location, the spawn point is
500 units along world X, not 500 units in front of the actor after it turns.
For a camera-based interaction trace, use the camera's world location and the camera's forward vector. For a character-body projectile, use the muzzle/socket world transform or the character's actor forward, depending on the design.
Sweep and Teleport pins¶
Location-setting nodes often expose Sweep and Teleport. These are about how
the move interacts with collision and physics. They are not about map travel.
Sweep¶
With sweep enabled, Unreal tries to move from the current location to the new location and checks for blocking collision along the way. If something blocks the move, the target can stop short and the hit result tells you what blocked it.
With sweep disabled, the node sets the location directly. That can skip through thin blockers or place the object inside geometry if nothing else prevents the final placement.
Important limitation: official node docs call out that child components are not swept independently. Do not assume every attached mesh gets its own separate collision-safe move just because the root swept.
Use sweep when:
- moving a collision-aware actor through the world;
- testing whether a move is blocked;
- avoiding a pawn or prop tunneling through a wall during a manual move.
Turn sweep off when:
- you deliberately place something without caring about the path;
- the object is a visual-only component;
- you are doing setup where collision is not relevant yet.
Teleport¶
The Teleport pin on these movement nodes is mostly about physics state. When teleporting, physics velocity can be preserved instead of being recalculated as if the object moved through space over a frame. Without teleport, movement can affect velocity based on the positional change.
Beginner rule:
Sweep decides whether collision along the path can stop the move.
Teleport decides how the move treats physics state.
If you want to move an actor to a nearby point but respect walls, think
Sweep. If you want to instantly place something and not treat the displacement
like physical motion, think Teleport.
Converting between spaces¶
Sometimes you have a point in one space and need it in another.
Common tasks:
| Need | Shape |
|---|---|
| Local point -> world point | Transform the local location by the parent/actor transform. |
| World point -> local/relative point | Invert the parent transform or make a relative transform. |
| Child offset from parent | Compare child world transform to parent world transform. |
| Socket point for spawning | Ask the mesh/socket for its world transform, then spawn in world space. |
Blueprint nodes with names like Transform Location,
Inverse Transform Location, Make Relative Transform, and
Get Relative Transform exist for these conversions. Use them instead of
guessing by adding/subtracting X/Y/Z values once rotation or scale is involved.
Simple subtraction works only for simple location offsets with no parent rotation/scale. As soon as the parent turns, "world difference" and "relative offset" are no longer the same thing.
Common traps¶
- You add
(500, 0, 0)and expect "in front." That is world X, not the actor's current forward direction. - You attach with Keep Relative and the object jumps. The old relative numbers are now being interpreted under a new parent.
- You attach with Snap to Target and the item scales oddly. The scale rule may be inheriting parent/socket scale you did not intend.
- You call Set Relative Location on the wrong component. You changed a mesh offset, not the actor root.
- You call Set Actor Location on an attached actor and fight the parent. The actor root still has an attach parent; world and relative updates can pull against each other.
- You disable Sweep and pass through walls. Direct location setting does not test the path.
- You enable Sweep and expect every child mesh to solve collision. The sweep is limited; build collision around the root or use a movement component when that is the real job.
- You store relative values as save data without the parent. A relative offset needs the same parent setup to mean the same thing later.
- You mix actor forward and control rotation forward. Body-facing and camera/aim-facing are separate in many character setups.
Lookalikes - which one do I want?¶
| Node or concept | Use when | Watch out |
|---|---|---|
| Set Actor Location | Move the whole actor/root to a world position. | It is not a local offset move. |
| Add Actor World Offset | Move the actor by a world-space delta. | (500, 0, 0) is world X. |
| Add Actor Local Offset | Move the actor by its own local axes. | Parent scale/rotation can still matter in an attachment chain. |
| Set Relative Location | Move a component relative to its parent. | Requires knowing which component is the target. |
| Set World Location | Put a component at a world point. | Unreal changes the relative value to achieve it. |
| Attach Actor To Component | Make an actor root follow a component/socket. | The attach rules decide the initial relative transform. |
| Get Forward Vector | Convert a rotation into a world-space direction. | Actor forward and camera/control forward may differ. |
| Transform Location | Convert a local point through a transform to world space. | Use inverse transform for the opposite direction. |
| Teleport node | Move an actor to a destination with teleport-style behavior. | It is still inside the current world, not Open Level. |
Going deeper¶
- Attach Actor To Component - parent/socket attachment and transform rules.
- Spawn Actor from Class - why spawn transforms are world-space setup for new actors.
- Line Trace By Channel - start and end points for camera/player traces.
- Add Movement Input - movement directions and why direction vectors are not locations.
- Spring Arm + Camera - camera components in a parented hierarchy.
- Official docs: Coordinate System and Spaces, Set Actor Location, Set World Location, Set Relative Location, Set Actor Relative Location, USceneComponent, Transform Location, Make Relative Transform, and Teleport.
- Engine source (requires engine access - we do not reproduce it here):
USceneComponenttransform and attachment state is declared inEngine/Source/Runtime/Engine/Classes/Components/SceneComponent.h; movement wrappers such asUSceneComponent::K2_SetWorldLocation,USceneComponent::K2_SetRelativeLocation, and attachment logic are implemented inEngine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp; actor transform wrappers such asAActor::K2_SetActorLocationare declared inEngine/Source/Runtime/Engine/Classes/GameFramework/Actor.hand implemented inEngine/Source/Runtime/Engine/Private/Actor.cpp.