
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
- Open the Content Drawer →
Input/Actions
folder. - Right-click → Input → Input Action.
- Name it
IA_ZoomAction
. - Open it, set Value Type = Axis1D (Float).
- 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
- Open your Input Mapping Context.
- Add a new mapping for
IA_ZoomAction
. - 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
- Open BP_RTSPlayer.
- In the Event Graph, right-click and search for
ZoomAction
.- Add the Enhanced Input Event for ZoomAction.
Reference Spring Arm
- From the Components panel, drag the Spring Arm into the graph.
- From this reference:
- Get Target Arm Length → reads current zoom distance.
- Set Target Arm Length → updates zoom distance.
Logic Flow
- From the ZoomAction node → drag the Action Value pin.
- Add a Multiply (Float × Float) node.
- Use 50 as the multiplier (zoom speed).
- Adjust higher/lower to customize zoom speed.
- Add an Add (Float + Float) node.
- Input A = Get Target Arm Length
- Input B = Multiply output
- Connect result → Set Target Arm Length (New Length).
- Wire the Triggered execution pin from ZoomAction → Set Target Arm Length.
✅ Now scrolling updates the Spring Arm’s length smoothly.
4) Testing the Zoom
- Open MainMap.
- Press Play.
- Scroll the mouse wheel up → camera zooms in.
- 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:
- Created an Axis1D ZoomAction.
- Bound it to the mouse wheel axis.
- Built Blueprint logic to scale & apply zoom to the Spring Arm.
- Tested smooth in/out zoom.
👉 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