VE Lua Documentation

Press F to search!

isPhysicsStepUsed

Definition


-- @/lua/vehicle/wheels.lua:1268

local function isPhysicsStepUsed()
  return M.wheelRotatorCount > 0
end

Callers

@/lua/vehicle/protocols/outgauge.lua

local function isPhysicsStepUsed()
  return false -- use graphics step. performance cost is ok. the update rate could reach UP TO min(getMaxUpdateRate(), graphicsFramerate)
@/lua/vehicle/hydros.lua

local function isPhysicsStepUsed()
  return M.update == update
@/lua/vehicle/controller.lua

local function isPhysicsStepUsed()
  --Check if any controller uses a function relevant to physics step
@/lua/vehicle/thrusters.lua

local function isPhysicsStepUsed()
  return M.update == update
@/lua/vehicle/main.lua
function updateCorePhysicsStepEnabled()
  -- print("Controller: " .. tostring(controller.isPhysicsStepUsed()))
  -- print("Powertrain: " .. tostring(powertrain.isPhysicsStepUsed()))
  -- print("Controller: " .. tostring(controller.isPhysicsStepUsed()))
  -- print("Powertrain: " .. tostring(powertrain.isPhysicsStepUsed()))
  -- print("Wheels: " .. tostring(wheels.isPhysicsStepUsed()))
  -- print("Powertrain: " .. tostring(powertrain.isPhysicsStepUsed()))
  -- print("Wheels: " .. tostring(wheels.isPhysicsStepUsed()))
  -- print("Thrusters: " .. tostring(thrusters.isPhysicsStepUsed()))
  -- print("Wheels: " .. tostring(wheels.isPhysicsStepUsed()))
  -- print("Thrusters: " .. tostring(thrusters.isPhysicsStepUsed()))
  -- print("Hydros: " .. tostring(hydros.isPhysicsStepUsed()))
  -- print("Thrusters: " .. tostring(thrusters.isPhysicsStepUsed()))
  -- print("Hydros: " .. tostring(hydros.isPhysicsStepUsed()))
  -- print("Beamstate: " .. tostring(beamstate.isPhysicsStepUsed()))
  -- print("Hydros: " .. tostring(hydros.isPhysicsStepUsed()))
  -- print("Beamstate: " .. tostring(beamstate.isPhysicsStepUsed()))
  -- print("---")
  -- print("---")
  obj:setPhysicsStepEnabled(controller.isPhysicsStepUsed() or powertrain.isPhysicsStepUsed() or wheels.isPhysicsStepUsed() or thrusters.isPhysicsStepUsed() or hydros.isPhysicsStepUsed() or beamstate.isPhysicsStepUsed() or protocols.isPhysicsStepUsed() or extensionsHook ~= nop)
end
  -- print("---")
  obj:setPhysicsStepEnabled(controller.isPhysicsStepUsed() or powertrain.isPhysicsStepUsed() or wheels.isPhysicsStepUsed() or thrusters.isPhysicsStepUsed() or hydros.isPhysicsStepUsed() or beamstate.isPhysicsStepUsed() or protocols.isPhysicsStepUsed() or extensionsHook ~= nop)
end
  -- print("---")
  obj:setPhysicsStepEnabled(controller.isPhysicsStepUsed() or powertrain.isPhysicsStepUsed() or wheels.isPhysicsStepUsed() or thrusters.isPhysicsStepUsed() or hydros.isPhysicsStepUsed() or beamstate.isPhysicsStepUsed() or protocols.isPhysicsStepUsed() or extensionsHook ~= nop)
end
  -- print("---")
  obj:setPhysicsStepEnabled(controller.isPhysicsStepUsed() or powertrain.isPhysicsStepUsed() or wheels.isPhysicsStepUsed() or thrusters.isPhysicsStepUsed() or hydros.isPhysicsStepUsed() or beamstate.isPhysicsStepUsed() or protocols.isPhysicsStepUsed() or extensionsHook ~= nop)
end
  -- print("---")
  obj:setPhysicsStepEnabled(controller.isPhysicsStepUsed() or powertrain.isPhysicsStepUsed() or wheels.isPhysicsStepUsed() or thrusters.isPhysicsStepUsed() or hydros.isPhysicsStepUsed() or beamstate.isPhysicsStepUsed() or protocols.isPhysicsStepUsed() or extensionsHook ~= nop)
end
  -- print("---")
  obj:setPhysicsStepEnabled(controller.isPhysicsStepUsed() or powertrain.isPhysicsStepUsed() or wheels.isPhysicsStepUsed() or thrusters.isPhysicsStepUsed() or hydros.isPhysicsStepUsed() or beamstate.isPhysicsStepUsed() or protocols.isPhysicsStepUsed() or extensionsHook ~= nop)
end
  -- print("---")
  obj:setPhysicsStepEnabled(controller.isPhysicsStepUsed() or powertrain.isPhysicsStepUsed() or wheels.isPhysicsStepUsed() or thrusters.isPhysicsStepUsed() or hydros.isPhysicsStepUsed() or beamstate.isPhysicsStepUsed() or protocols.isPhysicsStepUsed() or extensionsHook ~= nop)
end
@/lua/vehicle/protocols/motionSim.lua

local function isPhysicsStepUsed()
  --return false-- use graphics step. performance cost is ok. the update rate could reach UP TO min(getMaxUpdateRate(), graphicsFramerate)
@/lua/vehicle/beamstate.lua

local function isPhysicsStepUsed()
  return M.update == update
@/lua/vehicle/powertrain.lua

local function isPhysicsStepUsed()
  return hasPowertrain
@/lua/vehicle/extensions/gameplayStatistic.lua
local function onExtensionLoaded()
  if wheels.wheelCount == 0 and not hydros.isPhysicsStepUsed() and not powertrain.isPhysicsStepUsed() then
    return false --unload
local function onExtensionLoaded()
  if wheels.wheelCount == 0 and not hydros.isPhysicsStepUsed() and not powertrain.isPhysicsStepUsed() then
    return false --unload
@/lua/vehicle/protocols.lua
  protocol.port = protocol.module.getPort()
  protocol.physicsStepUsed = protocol.module.isPhysicsStepUsed()
  protocol.updateRate = protocol.module.getMaxUpdateRate()

local function isPhysicsStepUsed()
  return physicsStepUsed