VE Lua Documentation

Press F to search!

getSmoothRefVelocityXYZ

Definition


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

Callers

@/lua/vehicle/ai.lua
  currentSegment = {},
  vel = vec3(obj:getSmoothRefVelocityXYZ()),
  speed = vec3(obj:getSmoothRefVelocityXYZ()):length(),
  vel = vec3(obj:getSmoothRefVelocityXYZ()),
  speed = vec3(obj:getSmoothRefVelocityXYZ()):length(),
  staticFrictionCoef = 1,
  ego.rightVec:setCross(ego.dirVec, ego.upVec); ego.rightVec:normalize()
  ego.vel:set(obj:getSmoothRefVelocityXYZ())
  ego.speed = ego.vel:length()
@/lua/vehicle/controller/tech/roadsSensor.lua
  -- Compute the player vehicle pose data.
  pos, fwd, vel = obj:getPosition(), obj:getDirectionVector(), vec3(obj:getSmoothRefVelocityXYZ())
  fwd:normalize()
@/lua/vehicle/scriptai.lua
  if recordSpeed then
    v = vec3(obj:getSmoothRefVelocityXYZ()):length()
  end
@/lua/vehicle/input.lua
      local wheelSpeed = electrics.values["wheelspeed"]
      velVec:set(obj:getSmoothRefVelocityXYZ())
      local spd = max(abs(wheelSpeed), velVec:length()) -- ensure the fallback case is a high speed (using max instead of the usual min), so that autocentering happens when in doubt (airplane carriers, tanks with reported wheelspeed of zero, etc)
  local wheelSpeed = electrics.values["wheelspeed"]
  velVec:set(obj:getSmoothRefVelocityXYZ())
  rightVec:set(obj:getDirectionVectorRightXYZ())
@/lua/vehicle/hydros.lua

    smoothVelocity:set(obj:getSmoothRefVelocityXYZ())