How would I incorporate the ortho zoom to my mouse wheel?
This seems close to what I need, but I don't know why it's not working.
import bge
cont = bge.logic.getCurrentController()
cam = bge.logic.getCurrentScene().objects['Camera']
if not "DefaultFOVset" in cont.owner:
cam.ortho_scale = 20
cont.owner["DefaultFOVset"] = True
FOV = cam.ortho_scale
if cont.sensors["MWHEELUP"].positive:
if FOV < 20:
FOV += 1 # linear increase
FOV /= 0.9 # exponential increase
if FOV > 20:
FOV = 20
elif cont.sensors["MWHEELDOWN"].positive::
if FOV > 10:
FOV -= 1
FOV *= 0.9
if FOV < 10:
FOV = 10
cam.ortho_scale = FOV
Here's another one, I can only get it to zoom out. https://blender.stackexchange.com/a/58556/37524