VE Lua Documentation

Press F to search!

getObjectFrontPosition

Definition


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

Callers

@/lua/vehicle/extensions/tech/platooning.lua
        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.
        local rearB = frontB - (fwdB * lengthB)
@/lua/vehicle/controller/tech/idealRADARSensor.lua
          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.
          local rearB = frontB - (fwdB * lengthB)
@/lua/vehicle/ai.lua
        v.width = obj:getObjectInitialWidth(plID)
        local posFront = obj:getObjectFrontPosition(plID)
        local dirVec = v.dirVec
        v.width = obj:getObjectInitialWidth(plID)
        local posFront = obj:getObjectFrontPosition(plID)
        local dirVec = v.dirVec
      if v.states.lightbar == 2 or (v.states.lightbar == 1 and v.vel:squaredLength() >= 100) then
        local posFront = obj:getObjectFrontPosition(plID)
        minSirenSqDist = min(minSirenSqDist, posFront:squaredDistance(ego.pos))
        if vehId ~= objectId then
          debugDrawer:drawSphere(0.25, obj:getObjectFrontPosition(vehId), blue)
        end
          obj.debugDrawProxy:drawSphere(0.2, v.pos, color(0, 0, 255, 255))
          local vPos = vec3(obj:getObjectFrontPosition(k))
          obj.debugDrawProxy:drawSphere(0.2, vPos, color(0, 0, 255, 255))
@/lua/vehicle/extensions/tech/ACC.lua
                    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.
                    local rearB = frontB - (fwdB * lengthB)