GE Lua Documentation

Press F to search!

getGlobalCameras

Definition


-- @/lua/ge/extensions/core/camera.lua:99
local function getGlobalCameras()
  if not globalCamerasCache then
    globalCamerasCache = {}
    for camName,constructor in pairs(getConstructors()) do
      local cam = constructor()
      if cam.isGlobal then
        globalCamerasCache[camName] = cam
      end
    end
  end
  return globalCamerasCache
end

Callers

@/lua/ge/extensions/career/modules/playerDriving.lua
local function buildCamPath(targetPos, endDir)
  local camMode = core_camera.getGlobalCameras().bigMap
@/lua/ge/extensions/editor/api/camera.lua
local function setSmoothCameraDrag(drag)
  local cam = core_camera.getGlobalCameras().free
  if cam then
local function setSmoothCameraAngularDrag(drag)
  local cam = core_camera.getGlobalCameras().free
  if cam then
local function getSmoothCameraParams()
  local cam = core_camera.getGlobalCameras().free
  if cam then
local function setSmoothCameraParams(params)
  local cam = core_camera.getGlobalCameras().free
  if cam then
@/lua/ge/extensions/core/camera.lua
    runningCamsOrderCache = {}
    for camName,cam in pairs(getGlobalCameras()) do
      if cam.runningOrder then
  if not name and not getPlayerVehicle(0) then return end
  local newCam = getGlobalCameras()[name]
  if name and not newCam then return end
  -- process old cam
  local oldCam = getGlobalCameras()[activeGlobalCameraName]
  if oldCam and type(oldCam.onCameraChanged) == 'function' then oldCam:onCameraChanged(false) end
      if withTransition then
        getGlobalCameras().transition:start()
      end
  end
  local isGlobal = (camName == nil) or getGlobalCameras()[camName]
  if isGlobal then player = nil end
  -- update the selected camera
  local globalCam = getGlobalCameras()[activeGlobalCameraName]
  if globalCam then
  displayCameraNameUI(player)
  getGlobalCameras().transition:start()
end
  if not camName then
    local globalCam = getGlobalCameras()[activeGlobalCameraName]
    if globalCam then
local function proxy_PID(player, fct, ...)
  local globalCam = getGlobalCameras()[activeGlobalCameraName]
  if globalCam then
local function globalCameraFunction(globalCameraName, functionName, ...)
  local cam = getGlobalCameras()[globalCameraName]
  if not cam then
  end
  for _,cam in pairs(getGlobalCameras()) do
    if cam[functionName] then
  if not M.getActiveGlobalCameraName() then
    getGlobalCameras().transition:start(true)
  end
  data.globalCameras = {}
  for k,cam in pairs(getGlobalCameras()) do
    if cam.onSerialize then cam:onSerialize() end
  -- global cameras
  for camName, cam in pairs(getGlobalCameras()) do
    if data.globalCameras[camName] then
@/lua/ge/extensions/freeroam/bigMapMode.lua
local function frameObject(bbox, pitch, yaw, useCamYaw)
  local camMode = core_camera.getGlobalCameras().bigMap
  pitch = pitch or camMode.angle
local function calculateCamPos()
  local camMode = core_camera.getGlobalCameras().bigMap
  bigMapCamRotation = quatFromDir(vec3(0,0,-1), yVector)
local function buildTransitionPath(endMarkerData)
  local camMode = core_camera.getGlobalCameras().bigMap
  local previousNearClip = 0.1

  local camMode = core_camera.getGlobalCameras().bigMap
  if debugWindow then

  local camMode = core_camera.getGlobalCameras().bigMap
  setLevelProperties()
  else
    core_camera.getGlobalCameras().transition:start(false, {callback = startTransition})
    core_camera.setByName(0, 'bigMap', false, {initialCamData = {pos = bigMapInitialCamPos, rot = bigMapCamRotation}})
  if playerVehicle and not instant and not transitionActive then
    core_camera.getGlobalCameras().transition:start(false, {callback = function(endMarkerData) startTransition(endMarkerData, closeEscMenu) end})
    core_camera.setByName(0, previousCamMode, false)
local function zoom(value)
  local camMode = core_camera.getGlobalCameras().bigMap
  if camMode then
local function onMouseButton(buttonDown)
  local camMode = core_camera.getGlobalCameras().bigMap
  if not buttonDown and not mouseDragging then
local function updateMergeRadius(factor)
  local camMode = core_camera.getGlobalCameras().bigMap
  local maxMergeRadius = (camHeightAboveTerrain * camMode.fovMax) / 1000
@/lua/ge/extensions/editor/main.lua
local function getSmoothCameraParams()
  local cam = core_camera.getGlobalCameras().free
  if cam then