Part 3 – Add Smooth Camera Zoom In & Out To Your RTS Game In Unreal Engine 5

Part 3 – Add Smooth Camera Zoom In & Out To Your RTS Game In Unreal Engine 5

Add smooth RTS camera zoom in UE5.6 using Enhanced Input, mouse wheel, and Blueprint Spring Arm length logic for professional strategy controls.

This is Rambod, and welcome to Part 3 of the RTS Camera Series.
So far, we’ve set up the project, built an RTS pawn with WASD camera movement, and confirmed everything works with Enhanced Input. In this part, we’ll add smooth camera zoom in and out controlled by the mouse wheel — the essential next step for a polished RTS camera system.

By the end, you’ll have a zoom system that feels clean, scalable, and fully Blueprint-driven.


1) Create the Zoom Input Action

  1. Open the Content DrawerInput/Actions folder.
  2. Right-click → Input → Input Action.
  3. Name it IA_ZoomAction.
  4. Open it, set Value Type = Axis1D (Float).
  5. Save and close.

👉 Axis1D is perfect for scroll wheels, as it outputs a positive or negative float value depending on scroll direction.


2) Add Mouse Wheel Mapping

  1. Open your Input Mapping Context.
  2. Add a new mapping for IA_ZoomAction.
  3. Assign the Mouse Wheel Axis as the input key.

That’s all for the input setup. Next, we’ll build the logic.


3) Blueprint Setup in BP_RTSPlayer

  1. Open BP_RTSPlayer.
  2. In the Event Graph, right-click and search for ZoomAction.
    • Add the Enhanced Input Event for ZoomAction.

Reference Spring Arm

Logic Flow

✅ Now scrolling updates the Spring Arm’s length smoothly.


4) Testing the Zoom

  1. Open MainMap.
  2. Press Play.
  3. Scroll the mouse wheel up → camera zooms in.
  4. Scroll down → camera zooms out.

The Spring Arm length changes dynamically, keeping the camera smoothly centered as you move.


5) Subtitle Expansion (Full Flow)

“In the previous parts, we built our RTS pawn and WASD movement. Now we’re adding zoom. Create a new Input Action called ZoomAction, set it to Axis1D, and bind it in the Input Mapping Context to the mouse wheel axis. Open BP_RTSPlayer, add the Enhanced Input event for ZoomAction. Drag in your Spring Arm reference. Use Get Target Arm Length to read the current camera distance. Multiply the Action Value by 50 to scale zoom speed. Add this to the current arm length, then plug the result into Set Target Arm Length. Connect execution pins, hit play, and scroll the mouse wheel. The camera smoothly zooms in and out, giving you proper RTS-style zoom control.”


6) Wrap-Up

In Part 3, we:

👉 In Part 4, we’ll add camera rotation, completing the RTS camera’s three core features.

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

Code