making an fps: how to change fov with property

how do you change the fov with a float property and python? Is it possible? Does someone have a script? Thanks.

I believe you can key frame it so animate the fov, and then use a property action actuator. There is likely to be a python method for the camera, but I’m unsure of its name.

I think cameraObj.lens = x might change the fov through python. Not tried it myself.

Unfortunately lens only zooms with no distortion.

Even when using actions?

I do not know using actions, but via Python it just zooms the view.

Check this .blend: up and down arrows zoom in and out using the lens value. I hacked it out of a current .blend so it may be a bit buggy etc.


Cam_Zoom.blend (295 KB)

This works great, but is there a way to use degrees instead of mm? Or possibly just a way to convert mm to degrees using math?