Skip to content

Get Forward Vector & Find Look at Rotation

At a glance

Lives in: Blueprint API / Math / Vector and Math / Rotator; component forward vectors also appear under Transformation - Target: Kismet Math Library for rotator math, or an Actor/Scene Component for live object forward - Returns: a direction Vector or a Rotator - Changes: nothing by itself; these are math/query nodes - Can fail by: no failed exec pin, but wrong inputs produce wrong directions: zero-length look-at, using body forward when you meant camera forward, or keeping pitch when you wanted flat yaw - Official docs: Get Forward Vector, component Get Forward Vector, and Find Look at Rotation

The one-minute version

  • A forward vector is a direction, not a location. It tells you which way something points.
  • Unreal's forward axis is local X+. Get Forward Vector turns a rotation into the world-space direction of that X+ axis.
  • Actor forward, component forward, camera forward, and controller/control rotation forward can all be different.
  • To spawn something in front of an actor:
SpawnLocation = ActorLocation + ActorForwardVector * Distance
  • To make A face B, use Find Look at Rotation with Start = A location and Target = B location, then feed the result to Set Actor Rotation or smooth toward it.
  • If A and B have different heights, Find Look at Rotation includes pitch. For a ground enemy that should only turn left/right, keep the returned yaw and set pitch/roll to zero.
  • These nodes do not move, rotate, trace, spawn, or damage anything. They only calculate values for other nodes.

What "forward" means

Unreal uses X+ as forward. A forward vector is the world-space direction that local X+ points after a rotation is applied.

No rotation:
    forward = (1, 0, 0)

Actor turned right 90 degrees:
    forward is no longer world X+
    forward is whatever direction the actor's local X+ now points

That direction usually has length 1, so it is safe to multiply by a distance:

ForwardVector * 500 = a 500-unit offset in that forward direction

Do not confuse the offset with a location. This is incomplete:

Bad:
    SpawnLocation = ForwardVector * 500

That places the spawn near the world origin plus an offset. You usually need:

Good:
    SpawnLocation = SourceLocation + ForwardVector * 500

See World vs relative transforms for the coordinate-space foundation.

Which forward vector do I want?

The label "forward" is not enough. Pick the object or rotation that owns the direction you mean.

Source Means Use when
Get Actor Forward Vector The actor/root's current X+ direction in world space. Projectile from a character body, tank movement, object-facing logic.
Scene Component Get Forward Vector That component's X+ direction in world space. Camera traces, muzzle/socket directions, arrow components, weapon components.
Get Control Rotation -> Get Forward Vector The controller/camera/aim direction. Camera-relative movement, aim traces, looking where the player aims.
Yaw-only control rotation -> Get Forward Vector Controller heading flattened to the ground. Third-person ground movement where looking up should not push movement upward.
Find Look at Rotation result -> Get Forward Vector Direction from one point toward another. Building a direction from A to B, then using it as a vector.

For a third-person character, the camera can look north while the character body is still turning east. Both forwards are valid; only one matches your design.

Get Forward Vector from a rotation

The Kismet Math Library version takes a Rotator and returns the forward direction for that rotation:

In Rot = some rotation
Return Value = world-space direction of that rotation's X+ axis

Common inputs:

Get Actor Rotation
-> Get Forward Vector

Get Control Rotation
-> Break Rotator
-> Make Rotator (Pitch = 0, Yaw = control yaw, Roll = 0)
-> Get Forward Vector

Find Look at Rotation
-> Get Forward Vector

If the input rotation has pitch, the forward vector can point partly up or down. That is correct for an aim ray, but usually wrong for flat walking.

Component and actor forward vectors

Actor/component versions skip the explicit rotator input:

CameraComponent -> Get Forward Vector

That reads the component's current world transform and returns its world-space X+ direction.

Use component forward when the component is the real source:

  • camera forward for crosshair traces;
  • muzzle or arrow component forward for projectiles;
  • spring arm or socket-related direction when the component is authored to point the way you need.

Use actor forward when the whole actor/root direction is the real source:

  • body-facing movement;
  • spawn something in front of the actor's capsule/root;
  • make an NPC walk in the direction it is facing.

If a projectile leaves sideways, inspect the component's local rotation. The node may be returning exactly what the component's X+ axis says, while the mesh was authored facing another axis.

Spawn it in front of me

For an actor-body spawn:

Input Fire
-> Get Actor Location
-> Get Actor Forward Vector
-> Forward * 300
-> Location + offset
-> Spawn Actor from Class

For a camera/crosshair spawn or trace:

CameraLocation = Camera.GetWorldLocation
CameraForward = Camera.GetForwardVector
End = CameraLocation + CameraForward * 1500

For a muzzle:

MuzzleTransform = MuzzleComponent.GetWorldTransform
Spawn Actor from Class
    Spawn Transform = MuzzleTransform

The right source depends on what should visually and mechanically own the direction. A camera trace follows the screen. A muzzle spawn follows the weapon. An actor-forward spawn follows the body.

Find Look at Rotation

Find Look at Rotation takes two world locations:

Start  = where the looker is
Target = what the looker should point toward
Return Value = rotation whose forward direction points from Start to Target

For a turret:

TurretLocation
PlayerLocation
-> Find Look at Rotation
-> Set Actor Rotation on turret

For an enemy that should face the player but stay upright:

EnemyLocation
PlayerLocation
-> Find Look at Rotation
-> Break Rotator
-> Make Rotator
   Pitch = 0
   Yaw = returned Yaw
   Roll = 0
-> Set Actor Rotation

That pitch cleanup is the common beginner fix. If the player is above the enemy, the mathematically correct look-at rotation points upward. A humanoid enemy often should only turn around the Z axis.

Smoothly turning toward the result

Find Look at Rotation gives the target rotation immediately. If you plug it directly into Set Actor Rotation every frame, the actor snaps to face the target.

To turn smoothly:

Event Tick
-> Current = Get Actor Rotation
-> Target = Find Look at Rotation(SelfLocation, PlayerLocation)
-> RInterp To(Current, Target, Delta Seconds, Interp Speed)
-> Set Actor Rotation

For ground-only turning, zero pitch/roll on the target before the interp.

See Lerp, FInterp To, and moving things smoothly for the smoothing patterns.

When the result looks wrong

These nodes do not have failed exec pins. Debug the inputs and the frame of reference.

  1. You used actor forward when you meant camera forward. The body and view can point different ways.
  2. You used camera forward for ground movement without removing pitch. Looking up/down makes the direction contain Z.
  3. You added a forward vector without adding a start location. A direction times distance is an offset, not a world point.
  4. Start and Target are the same point. There is no useful direction from a point to itself, so the returned rotation is not meaningful gameplay data.
  5. The mesh appears sideways. The actor/component forward may be correct, but the visible mesh asset is rotated relative to the root.
  6. The enemy tilts up/down. Find Look at Rotation includes pitch when target height differs; use yaw-only rotation for upright actors.
  7. The actor snaps. The math node is instant; use RInterp To, a Timeline, or a movement/rotation component for smoothing.
  8. The projectile spawns in the right place but moves wrong. Spawn transform and projectile movement direction are separate setup paths.

Use Print String and the Output Log or breakpoints to inspect the source location, source rotation, forward vector, target location, and returned rotator.

The C++ twin

For the curious, here is the same idea in C++ (our own example code):

void ATrainingTurret::FaceTarget(AActor* TargetActor, float DeltaSeconds)
{
    if (!IsValid(TargetActor))
    {
        return;
    }

    const FVector Start = GetActorLocation();
    const FVector Target = TargetActor->GetActorLocation();
    FRotator Desired = UKismetMathLibrary::FindLookAtRotation(Start, Target);

    Desired.Pitch = 0.0f;
    Desired.Roll = 0.0f;

    const FRotator Smoothed = FMath::RInterpTo(
        GetActorRotation(),
        Desired,
        DeltaSeconds,
        8.0f);

    SetActorRotation(Smoothed);
}

Lookalikes - which one do I want?

Node Use when Watch out
Get Forward Vector You need a direction from a rotation/component/actor. It is not a location.
Get Right Vector You need local Y+ direction, often for strafing. Same source-choice problem as forward.
Get Up Vector You need local Z+ direction. Not usually ground movement forward.
Find Look at Rotation You need the rotation from one world point toward another. Includes pitch when heights differ.
Make Rot from X / Make Rot from XY You already have direction vectors and need a rotator basis. More advanced axis control.
Set Actor Rotation You want to apply a rotation now. It does not calculate the target direction.
RInterp To You want to smooth from current rotation toward target rotation. Needs Delta Seconds and repeated updates.
Line Trace By Channel You want to ask what lies along a direction. It needs Start and End world points.

Going deeper