camera script and zoom...

Hello guys,

I have a very simple script that would change the FOV of my camera. Let’s say the script is called cameraScript and I attached it to the Camera object.
Now, in the OnGui I have a slider, so … in the OnGui I call:

hVerticalValue = GUI.VerticalSlider(Rect (35, 100, 100, 50), hVerticalValue, 10, 100.0); //Scroolbar for zooming
fieldOfView = hVerticalValue;

But the field of view in the animation doesn’t change :frowning:
Should I put that in the Update function?

Thanks,
Giancarlo

What’s ‘fieldOfView’? Can you post the whole script? (Be sure to use ‘code’ tags.)