GOOrbit.cs
This script, attached to the main camera, provides orbit and zoom camera controls; both working with mouse and touch.
Orbit: moves the camera around the character at a certain distance always facing it. Activate this gesture moving the finger (or mouse) around the character.
Zoom: changes the distance between the camera and the character, as the max distance value is reached the angle between the camera and the character changes accordingly. Activate this gesture with pinch (two fingers) or scroll wheel.
Parameters:
(gameobject) target: the orbit target.
(float) distance: starting distance value.
(float) orbitSpeed: multiplier for orbit gesture.
(float) pinchSpeed: multiplier for pinch gesture.
(float) YMin, YMax, DistanceMin, DistanceMax: tweak these values as you prefer to adjust the distance and y ranges.
zoomCurve: This is only on the GOOrbit script, and it’s made to design your own zoom camera movement.