VE Lua Documentation

Press F to search!

onPhysicsStep

Definition


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

--!!! PERFORMANCE HEAVY, DEBUG ONLY !!!
--function onUnstableNode(nodeId)
--  print("onUnstableNode: " .. nodeId)
--end

-- step functions
function onPhysicsStep(dtPhys)
  wheels.updateWheelVelocities(dtPhys)
  powertrain.update(dtPhys)
  controller.updateWheelsIntermediate(dtPhys)
  wheels.updateWheelTorques(dtPhys)
  controller.update(dtPhys)
  thrusters.update()
  hydros.update(dtPhys)
  beamstate.update(dtPhys)
  protocols.update(dtPhys)
  extensionsHook("onPhysicsStep", dtPhys)
end

Callers

@/lua/vehicle/extensions/tech/wheelForces.lua

local function onPhysicsStep(dt)
  --print("wheellogger physics step")
@/lua/vehicle/extensions/test/ffbCalibration.lua

local function onPhysicsStep(dtSim)
  airspeed = obj:getGroundSpeed()