GE Lua Documentation

Press F to search!

boost

Definition


-- @/lua/ge/extensions/core/funstuff.lua:39

local function boost()
  local veh = getPlayerVehicle(0)
  if veh then
    local dir = veh:getDirectionVector()
    dir:normalize()
    dir = dir * 25
    veh:applyClusterVelocityScaleAdd(veh:getRefNodeId(), 1, dir.x, dir.y, dir.z)
  end
  return {"hide"}
end

Callers

@/lua/vehicle/extensions/core/booster.lua

local function boost(force, dt)
  table.insert(boosts, {vec3(force), dt})
@/lua/ge/extensions/util/booster.lua
    if veh then
      veh:queueLuaCommand("extensions.core_booster.boost(vec3(0,0,1),0.01)")
    end
@/lua/ge/extensions/flowgraph/nodes/vehicle/boost.lua
  end
  veh:queueLuaCommand('core_booster.boost({'..(self.pinIn.power.value or 0) .. ',0,0},' .. (self.mgr.dtSim)..')')
end