Part 2 – Smooth WASD Camera Movement For Your RTS Game In Unreal Engine 5

Part 2 – Smooth WASD Camera Movement For Your RTS Game In Unreal Engine 5

Add smooth WASD camera movement to your RTS Pawn in UE5.6 using Enhanced Input, axis mapping, modifiers, and Blueprint logic for clean strategy controls.

This is Rambod, and this is Part 2 of the RTS Camera Series.
In Part 1 we set up the RTS Pawn, Controller, Game Mode, and Enhanced Input system with a test event. Now it’s time to build true WASD camera movement: smooth, responsive, and fully Blueprint-driven.

By the end of this tutorial, your RTS camera will glide across the map with WASD keys, just like in professional strategy games.


1) Create the MoveAction Input Asset

👉 Axis2D gives you both X and Y in a single action (forward/back + right/left).


2) Bind WASD Keys in the Input Mapping Context

  1. Open your existing Input Mapping Context.
  2. Remove the old TestAction binding from Part 1.
  3. Add a new mapping → set it to IA_MoveAction.
  4. Add four key bindings: W, S, A, D.

Modifiers setup:

📌 Swizzle rearranges axis order. For W/S, change Swizzle order to XZY to ensure correct forward/back direction.


3) Correct the Camera’s Spring Arm Rotation

In Part 1 we used the wrong values. Let’s fix it:

This corrects the angled RTS perspective.


4) Add Floating Pawn Movement

Your Pawn needs a movement component:

👉 Without this, AddMovementInput won’t work.


5) Set Up the Movement Logic

  1. Open BP_RTSPlayer → Event Graph.
  2. Delete the old TestAction event.
  3. Right-click → search for IA_MoveAction event.
  4. Expand the node.
  5. From the Action Value, drag out → add Break Vector2D.
    • X = Forward/Back
    • Y = Right/Left

Add Direction Vectors:

Add Movement Input:

Wiring values:

✅ This gives smooth WASD camera movement based on pawn orientation.


6) Test the Setup

  1. Open MainMap.
  2. Press Play.
  3. Use W, A, S, D:
    • W = Forward
    • S = Backward
    • A = Left
    • D = Right

You’ll see the camera pawn move smoothly across the level with clean responsiveness.


7) Subtitle Expansion (Full Flow)

“In the last part, we set up our project and confirmed input worked. Now, create a new Input Action called MoveAction, set it to Axis2D. Bind it in the Input Mapping Context to W, S, A, and D. Add Swizzle modifiers for all keys, and Negate for S and A so backward and left movement work correctly. Fix the Spring Arm rotation on the pawn to 180, –105, 180. Add a Floating Pawn Movement component so the pawn can actually move. In the Event Graph, remove the old TestAction. Add MoveAction, expand it, and Break Vector2D. Use Get Actor Forward Vector and Get Actor Right Vector. Connect them into two Add Movement Input nodes. Wire X to forward, Y to right. Now when you press Play, W, A, S, D will smoothly move the pawn like a proper RTS camera.”


8) Wrap-Up

In Part 2, we:

👉 In Part 3, we’ll add zoom and rotation to the RTS camera.

📦 GitHub: UE5 RTS Camera Tutorial
📚 Docs: Enhanced Input Documentation
💬 Discord: Join the Dev Community
🌍 More info: Rambod.net RTS Camera

Code