A Bare Bones Camera Script for the MainCamera in Unity

So you built and ran your scene and oh no, you can’t manipulate the camera to look around!!

Fear not, you can start with this simple script for the MainCamera and add complexity from there if you need it.

It supports zooming with scroll wheel, panning with middle mouse (holding down the scroll wheel) and rotation by holding down the left mouse button so you can “look around” from that point.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store