GE Lua Documentation

Press F to search!

cameraZoom

Definition


-- @/lua/ge/extensions/core/camera.lua:1301

local function cameraZoom(val)
  if val > 0 then
    MoveManager.zoomIn = val
    MoveManager.zoomOut = 0
  else
    MoveManager.zoomIn = 0
    MoveManager.zoomOut = -val
  end
end

Callers

@/lua/ge/extensions/gameplay/garageMode.lua
    stopZooming = stopZooming + 0.05
    core_camera.cameraZoom(zoomVal * stopZooming)
    zoomDirectionLastFrame = value > 0
    if stopZooming <= 0 then
      core_camera.cameraZoom(0)
      stopZooming = 0
@/lua/ge/extensions/editor/rallyEditor.lua
      if zoom_in then
        core_camera.cameraZoom(-zoomAmount)
      elseif zoom_out then
      elseif zoom_out then
        core_camera.cameraZoom(zoomAmount)
      end
    if val == 0 then
      core_camera.cameraZoom(0.4)
    elseif val == 1.0 then
    elseif val == 1.0 then
      core_camera.cameraZoom(-0.4)
    end
@/ui/ui-vue/mockdata/inputBindings.js
                "tags": ["tags.camera.fov_short", "tags.camera.fov_long"],
                "onChange": "if core_camera then core_camera.cameraZoom(-0.1 * VALUE) end",
                "title": "ui.inputActions.camera.increase_zoom.title",
                "tags": ["tags.camera.fov_short", "tags.camera.fov_long"],
                "onChange": "if core_camera then core_camera.cameraZoom(0.1 * VALUE) end",
                "title": "ui.inputActions.camera.decrease_zoom.title",
                "tags": ["tags.camera.fov_short", "tags.camera.fov_long"],
                "onChange": "if core_camera then if commands.isFreeCamera() and FILTERTYPE==0 then core_camera.moveup(VALUE) else core_camera.cameraZoom(-0.1 * VALUE) end end",
                "title": "ui.inputActions.camera.increase_zoom_or_freecam_up.title",
                "tags": ["tags.camera.fov_short", "tags.camera.fov_long"],
                "onChange": "if core_camera then if commands.isFreeCamera() and FILTERTYPE==0 then core_camera.movedown(VALUE) else core_camera.cameraZoom(0.1 * VALUE) end end",
                "title": "ui.inputActions.camera.decrease_zoom_or_freecam_down.title",
@/lua/ge/extensions/core/cameraModes/bigMap.lua
    stopZooming = stopZooming + 0.1
    core_camera.cameraZoom(zoomVal * stopZooming)
    zoomMouseStartPos = getRayCastHit(getCameraMouseRay())
    if stopZooming <= 0 then
      core_camera.cameraZoom(0)
      stopZooming = 0
@/lua/ge/extensions/freeroam/bigMapMode.lua
  end
  core_camera.cameraZoom(zoomInValue + zoomOutValue)
end
local function controllerZoom(value, zoomIn)
  core_camera.cameraZoom(value)
end