Camera_GetZoom - MalisPierre/ModularGame GitHub Wiki

float Camera.GetZoom()


Description:

GetZoom return the Zoom of the Camera. In Perspective mode, the Zoom translate into the FieldOfView. In Orthographic mode, the Zoom translate into the Camera Size.


Parameters:

  • Void

Code Example:

function Update()
        CurrentZoom = Framework.Camera.GetZoom()
	if  Framework.Input.CheckInput(Framework.CreateKeyCode("P")) then
		Framework.Camera.SetZoom(CurrentZoom + 1.0)
        elseif  Framework.Input.CheckInput(Framework.CreateKeyCode("M")) then
                Framework.Camera.SetZoom(CurrentZoom - 1.0)
        end
end