UE5 RTS Camera Smooth Zoom
Camera zoom is one of the core controls that makes an RTS camera feel usable instead of frustrating. If players cannot quickly zoom in to inspect an area or zoom out to recover map awareness, the camera immediately feels limited.
In this tutorial, you will build a smooth zoom system for an RTS camera in Unreal Engine 5 using Blueprints and Enhanced Input. You will create an Axis1D input action for the mouse wheel, bind it inside your Input Mapping Context, and use that input to dynamically update the Spring Arm’s target arm length.
This is a small system, but it is one of the main features that makes an RTS camera feel more complete and much more practical during gameplay.
GitHub project files: UE5 RTS Camera Tutorial Repository
Unreal Engine documentation: Enhanced Input Guide
Unreal Engine Spring Arm documentation: Spring Arm Documentation
Subscribe for more Unreal Engine tutorials: Rambod YouTube Channel
What You Will Build
- A mouse wheel zoom input using Enhanced Input
- An Axis1D input action for zoom direction and intensity
- Blueprint logic that reads the Spring Arm length
- Zoom scaling using a simple multiplier
- A dynamic camera zoom system for an RTS pawn
Why RTS Camera Zoom Matters
In an RTS camera system, zoom is not a cosmetic feature. It directly affects usability.
Players use zoom to:
- inspect units or objects more closely
- get a wider tactical view of the map
- adjust the camera for navigation and positioning
- make the game feel more responsive and modern
Without zoom, the camera feels rigid. With it, the player gets control over how much of the game world they want to see at any moment.
How This Zoom System Works
The full logic is simple:
- Create an Axis1D input action for the mouse wheel.
- Bind that input action inside the Input Mapping Context.
- Open the RTS camera pawn Blueprint.
- Read the current Spring Arm target length.
- Multiply the mouse wheel input value by a zoom speed.
- Add that result to the current arm length.
- Set the new target arm length.
Because the camera is attached to the Spring Arm, changing the arm length changes the camera distance from the pawn. That is the whole zoom effect.
Step 1: Create the Zoom Input Action
Open your Input Actions folder, usually something like:
Input/Actions
Create a new Input Action named:
IA_ZoomAction
Open the new input action and set:
Value Type = Axis1D
Axis1D is the correct choice here because the mouse wheel gives you a directional scalar value rather than a simple pressed or released state.
Why Axis1D Is the Right Input Type
A mouse wheel does not behave like a simple button. It produces directional input:
- scroll one direction for zoom in
- scroll the other direction for zoom out
Axis1D is built for this kind of single-value input. It gives you a float that can be positive or negative depending on scroll direction.
Using a Digital input here would be the wrong tool for the job.
Step 2: Bind the Mouse Wheel in the Input Mapping Context
Open your main Input Mapping Context, usually something like:
IMC_Default
Add a new mapping for:
IA_ZoomAction
Bind it to:
Mouse Wheel Axis
That is all you need for the input setup.
At this point, Unreal knows that the mouse wheel should drive the zoom action.
Step 3: Open BP_RTSPlayer
Open the Blueprint that controls your RTS camera pawn:
BP_RTSPlayer
This is where the zoom logic will live.
Since the Spring Arm is already part of the RTS camera setup, this is the correct place to control camera distance.
Step 4: Add the Enhanced Input Zoom Event
In the Event Graph, right-click and search for your zoom action.
Add the Enhanced Input event for:
IA_ZoomAction
This node will fire whenever the mouse wheel axis input is triggered.
Step 5: Reference the Spring Arm
From the Components panel, drag your:
Spring Arm
into the graph as a reference.
From this reference, use:
- Get Target Arm Length
- Set Target Arm Length
These are the two core nodes for the entire zoom system.
Why Spring Arm Length Controls Zoom
In this camera setup, the camera sits on the end of a Spring Arm. That means the distance between the pawn and the camera is controlled by the Spring Arm’s target arm length.
So when you change the target arm length:
- a smaller value moves the camera closer
- a larger value moves the camera farther away
That is the simplest and cleanest way to handle RTS camera zoom in this kind of setup.
Step 6: Read the Current Arm Length
Use:
Get Target Arm Length
This gives you the current zoom distance before applying the new mouse wheel input.
You need the existing value because the zoom logic is incremental. Each scroll step changes the current value rather than replacing it with a hardcoded number.
Step 7: Scale the Mouse Wheel Input
From the ZoomAction event, take the action value and multiply it by a float.
Example multiplier:
50
This acts as your zoom speed.
The formula is:
ScaledZoomInput = ActionValue × 50
If the zoom feels too slow, increase the multiplier. If it feels too aggressive, lower it.
Why the Multiplier Matters
Mouse wheel input values are usually too small to feel useful by themselves. The multiplier turns that raw input into a meaningful zoom step.
This is one of the easiest ways to tune the feel of the system without changing the structure of the Blueprint.
Step 8: Add the Zoom Input to the Current Arm Length
Use an Add float node:
NewArmLength = CurrentArmLength + ScaledZoomInput
This creates the new Spring Arm length based on the current zoom distance and the mouse wheel input.
This is the central math for the whole zoom system.
Step 9: Apply the New Arm Length
Feed the result into:
Set Target Arm Length
Then connect the execution pin from the ZoomAction event into the Set Target Arm Length node.
That is what makes the zoom actually happen when the mouse wheel moves.
How the Full Zoom Blueprint Flow Works
The full logic is:
- ZoomAction input fires.
- Read the current Spring Arm target arm length.
- Multiply the mouse wheel axis value by a zoom speed.
- Add that scaled value to the current arm length.
- Set the Spring Arm target arm length to the result.
It is clean, fast, and exactly enough for a basic RTS zoom system.
Step 10: Test the Zoom in the Editor
Open your main map and press Play.
Then use the mouse wheel:
- scroll one direction to zoom in
- scroll the other direction to zoom out
The camera should now move smoothly closer to or farther from the RTS pawn by changing the Spring Arm length.
What the Final Result Should Feel Like
When the system is working properly:
- the zoom reacts immediately to the mouse wheel
- the camera stays centered correctly
- zoom speed feels readable and controllable
- the system feels like part of a real RTS camera rather than a rough prototype
Even a basic zoom setup makes the camera feel much more complete.
What This Version Does Not Yet Include
This tutorial builds the core zoom system, but it does not yet add:
- minimum zoom clamp
- maximum zoom clamp
- interpolated zoom smoothing
- zoom-dependent pitch changes
- terrain-aware zoom behavior
Those are useful improvements, but the current goal is getting a working zoom system in place first.
Why Starting Simple Is the Right Move
A lot of people try to build the “final perfect camera system” immediately and end up with a pile of overcomplicated Blueprint logic.
That is a waste of time.
Start with:
- working input
- working Spring Arm zoom
- working in-editor test
Then add limits and polish later.
Common Problem: Zoom Does Nothing
If the mouse wheel seems dead:
- make sure IA_ZoomAction exists
- make sure it is set to Axis1D
- make sure it is mapped in the Input Mapping Context
- make sure the correct Input Mapping Context is active
- make sure the zoom event was added in BP_RTSPlayer
- make sure the Spring Arm reference is valid
Most of the time, it is either the input mapping or the event node.
Common Problem: Zoom Is Too Fast or Too Slow
If the zoom feels bad, the first thing to change is the multiplier value.
Example:
- lower than 50 for slower zoom
- higher than 50 for faster zoom
Do not overcomplicate tuning. This value exists exactly for that reason.
Common Problem: Zoom Direction Feels Backward
Depending on how the mouse wheel axis is interpreted in your setup, scrolling direction may feel reversed.
If that happens, simply multiply by a negative value instead, or invert the input in the mapping setup.
That is not a serious problem. It is just direction sign.
Common Problem: Camera Gets Too Close or Too Far
This tutorial does not clamp the Spring Arm length yet, so extreme scrolling may push the camera into bad ranges.
The next logical improvement is to clamp the final arm length so it stays inside a safe zoom range.
For now, the raw zoom logic is enough to prove the system works.
Why This Is a Good RTS Camera Building Block
This zoom system fits nicely with the rest of an RTS camera because it stays modular:
- WASD controls horizontal movement
- the Spring Arm handles zoom distance
- Enhanced Input handles the mouse wheel
- future systems can add clamping and smoothing without replacing the core logic
That is a strong foundation. Keep it simple, then extend it.
What to Improve Next
After this, useful next upgrades include:
- minimum and maximum zoom limits
- camera rotation
- terrain-follow behavior
- edge scrolling
- map boundaries
- zoom smoothing with interpolation
But none of those matter if the base mouse wheel zoom does not work correctly first.
Conclusion
In this tutorial, you created a mouse-wheel zoom input using Enhanced Input, mapped it as an Axis1D action, read the current Spring Arm target arm length, scaled the zoom input with a multiplier, and applied the result back to the Spring Arm.
That gives your Unreal Engine 5 RTS camera a clean, useful zoom system and makes the overall camera controls feel much more complete.
Download the project files: UE5 RTS Camera Tutorial GitHub Repository
Subscribe for the next RTS camera tutorial: Subscribe to Rambod on YouTube
Resources
Frequently Asked Questions
How do I add zoom to an RTS camera in Unreal Engine 5?
Create an Axis1D input action for the mouse wheel, bind it in the Input Mapping Context, then use the input value to modify the Spring Arm target arm length in Blueprint.
Why use Axis1D for the zoom input?
Because the mouse wheel produces a single directional float-style value, which fits Axis1D much better than a Digital input.
Why does Spring Arm length control the zoom?
The camera sits on the end of the Spring Arm, so changing the arm length changes the camera distance from the RTS pawn.
What controls the zoom speed in this setup?
The multiplier applied to the input value controls how fast the zoom changes.
Why does my zoom feel reversed?
The input direction may need to be inverted. You can fix that by using a negative multiplier or adjusting the input mapping behavior.
Should I clamp the zoom range?
Yes, eventually. This basic version does not add clamping yet, but minimum and maximum zoom limits are a logical next improvement.
Continue RTS Camera Series
Back to RTS Camera Series playlist • Lesson 4 of 8
Recommended resource
Recommended for this tutorial
Useful tools selected for this workflow topic.