VE Lua Documentation

Press F to search!

onGraphicsStep

Definition


-- @/lua/vehicle/main.lua:91

-- This is called in the local scope, so it is NOT safe to do things that contact things outside the vehicle
function onGraphicsStep(dtSim)
  lastDt = dtSim
  sensors.updateGFX(dtSim) -- must be before input and ai
  mapmgr.sendTracking() -- must be before ai
  wheels.updateGFX(dtSim)
  ai.updateGFX(dtSim) -- must be before input and after wheels
  input.updateGFX(dtSim) -- must be as early as possible
  electrics.updateGFX(dtSim)
  controller.updateGFX(dtSim)
  electrics.updateGFXSecondStep(dtSim)
  extensions.hook("updateGFX", dtSim) -- must be before drivetrain, hydros and after electrics
  hydros.updateGFX(dtSim) -- must be early for FFB, but after (input, electrics) and before props
  powertrain.updateGFX(dtSim)
  energyStorage.updateGFX(dtSim)
  drivetrain.updateGFX(dtSim)
  beamstate.updateGFX(dtSim) -- must be after drivetrain
  protocols.updateGFX(dtSim)
  sounds.updateGFX(dtSim)
  thrusters.updateGFX() -- should be after extensions.hook

  if streams.hasActiveStreams() and obj:getUpdateUIflag() then
    guihooks.updateStreams = true
    guihooks.sendStreams()
  else
    guihooks.updateStreams = false
  end

  if playerInfo.firstPlayerSeated then
    damageTracker.updateGFX(dtSim)
  end

  props.updateGFX() -- must be after hydros
  material.updateGFX()
  fire.updateGFX(dtSim)
  recovery.updateGFX(dtSim)
  powertrain.updateGFXLastStage(dtSim)
end

Callers