How To ZOOM With Mouse Wheel Scroll In Unity For Perspective Or Orthographic Camera | Unity Tutorial

Опубликовано: 12 Июнь 2026
на канале: Devsplorer
18,396
176

This Unity tutorial covers how to zoom with mouse wheel scroll in Unity for both perspective and orthographic camera.
Here we zoom with the mouse wheel by changing the field of view value of the perspective camera and size value of the orthographic camera.

00:00 Intro & Demo
00:58 ZoomWithMouse Script
02:23 Outro

#Zoom #MouseWheel #Scroll

#devlog
I use this approach in my level editor as mentioned in the video. Previously I was moving a perspective camera for zooming, if I were to create a tutorial on that it wouldn't be as inclusive as this one. Turns out it is not so hard to apply zooming to both orthographic and perspective camera from the same script. This one will be a reusable script for me for future projects ^^

If you want to see more of this kind of videos, please give this one a LIKE and SUBSCRIBE for future ones. Comments are always appreciated.
To Subscribe:    / @devsplorer  

If you are new here check out the CHANNEL TRAILER:
   • Welcome To Devsplorer | Game Dev Channel T...  

Confetti Particle System With Default Unity Assets | Unity Particle System Tutorial
   • Confetti Particle System With Default Unit...  
Divide Cubes Into Smaller Cubes Using Transform Functions In Unity | Tutorial
   • Divide Cubes Into Smaller Cubes Using Tran...  
How To Make Automatic Shooter In Unity | Spawn & Shoot With Physics | Tutorial | One Script
   • How To Create Auto Shooter In Unity | Unit...  
Simple Drag & Shoot mechanics developed with Unity,
   • How To Drag And Shoot 3D Objects in Unity ...  
SteamVR tutorials,
   • Unity SteamVR Setup For Unity 2019 | Unity...  

Here are some written tutorials https://devsplorer.wordpress.com/
I generally share sneak peeks of the next mechanics:
Twitter:   / eccegd  
Instagram:   / devsplorer  

Thanks for reading up to this point and see you in the next explorations :)
Have A Great Day!