Camera zoom for Free Look Camera Rig

I would like to add mouse zoom capability to Free Look Camera Rig and Third Person Controller from Standard Asset, but I am unable to understand how they set up the camera distance from character. The best I can do is to move the Pivot but with erratic results.

Anyone?

If I remember correctly, you move the camera itself and not the pivot to adjust the distance.

You can also adjust the field of view on the camera to create a zoom effect.

Thanks, but in the camera script there is no clue about how is the distance from character set. A script added to camera trying to reposition does not work, because something else is making it come back to the old value.
As for modifying the field of view, is not an option in a 3D game. Maybe in 2D with an isometric camera.

It’s the ProtectCameraFromWallClip script that does this. It looks like you can adjust the distance by changing the m_OriginalDist variable.

It’s commonly used in 3D games for things like sniper scopes or aim down sights, so it does have its uses. Might not be what you’re looking for here though.

1 Like

Thanks @steego for m_OriginalDist, I found that too.
In my case modifying field of view is not an option as the game is medieval fantasy rpg.