VE Lua Documentation

Press F to search!

getInitialLength

Definition


-- @/=[C]:-1
function getInitialLength(...)

Callers

@/lua/vehicle/ai.lua
  ego.width = ego.width or obj:getInitialWidth()
  ego.length = ego.length or obj:getInitialLength()
  ego.staticFrictionCoef = parameters.staticFrictionCoefMult * obj:getStaticFrictionCoef() -- depends on ground model, tire and tire load
@/lua/ge/extensions/editor/scriptAIEditor.lua
            if obj ~= nil then
              length, width, height = obj:getInitialLength(), obj:getInitialWidth(), obj:getInitialHeight()
            end
@/lua/vehicle/extensions/tech/vehiclePOI.lua
  -- [Note: these are in world-space].
  local pos, fwd, vehLength, vehFront = obj:getPosition(), obj:getDirectionVector(), obj:getInitialLength(), obj:getFrontPosition()
  fwd:normalize()
@/lua/vehicle/controller/tech/cosimulationCoupling.lua
  -- Cache some properties known at init, in state.
  initLength, initWidth, initHeight = obj:getInitialLength(), obj:getInitialWidth(), obj:getInitialHeight()
@/lua/ge/map.lua
  local a = max(1e-30, -gravity * (ff + fw))
  return relativePosLen > relativeSpeed * relativeSpeed / (2 * a) + obj:getInitialLength() * 0.5 + radius
end