VE Lua Documentation

Press F to search!

getObjectInitialLength

Definition


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

Callers

@/lua/vehicle/extensions/tech/platooning.lua
        upB:normalize()
        local widthB, lengthB = obj:getObjectInitialWidth(k), obj:getObjectInitialLength(k)                     -- The other vehicle's dimensions.
        local frontB = obj:getObjectFrontPosition(k)                                                            -- The other vehicle's front/rear bumper midpoint positions.
   
    vehicleSize = obj:getObjectInitialLength(tonumber(platoonLeaderID))
   
local function getVehicleLength(vid)  -- length of the vehicle (id input)
  local length = obj:getObjectInitialLength(vid)
  return length
@/lua/vehicle/extensions/tech/ACC.lua
                    upB:normalize()
                    local widthB, lengthB = obj:getObjectInitialWidth(k), obj:getObjectInitialLength(k) -- The other vehicle's dimensions.
                    local frontB = obj:getObjectFrontPosition(k) -- The other vehicle's front/rear bumper midpoint positions.
@/lua/vehicle/controller/tech/idealRADARSensor.lua
          upB:normalize()
          local widthB, lengthB = obj:getObjectInitialWidth(k), obj:getObjectInitialLength(k)                     -- The other vehicle's dimensions.
          local frontB = obj:getObjectFrontPosition(k)                                                            -- The other vehicle's front/rear bumper midpoint positions.
@/lua/vehicle/ai.lua
  y:setScaled(obj:getObjectInitialWidth(id) * 0.5 / max(y:length(), 1e-30))
  x:setScaled(obj:getObjectInitialLength(id) * 0.5)
  z:setScaled(obj:getObjectInitialHeight(id) * 0.5)
        twt.OBBinRange[i+3]:setScaled(obj:getObjectInitialWidth(id) * 0.5)
        twt.OBBinRange[i+2]:setScaled(obj:getObjectInitialLength(id) * 0.5)
        twt.OBBinRange[i+4]:setScaled(obj:getObjectInitialHeight(id) * 0.5)
      if opt.avoidCars == 'on' or v.targetType == 'follow' then
        v.length = obj:getObjectInitialLength(plID) + 0.3
        v.width = obj:getObjectInitialWidth(plID)
      if opt.avoidCars == 'on' or v.targetType == 'follow' then
        v.length = obj:getObjectInitialLength(plID) + 0.3
        v.width = obj:getObjectInitialWidth(plID)