VE Lua Documentation

Press F to search!

getNodeVelocity

Definition


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

Callers

@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veJBeamPicker.lua
  {name = "Displacement",     enabled = im.BoolPtr(false),    units = "m",      color = rainbowColor(8, 2, 1),   data = function(id) return vEditor.vehicle:getNodePosition(id):length() end, plotData = {}},
  {name = "Speed",            enabled = im.BoolPtr(true),     units = "m/s",    color = rainbowColor(8, 3, 1),   data = function(id) return vEditor.vehicle:getNodeVelocity(id):length() end, plotData = {}},
  {name = "Relative Speed",   enabled = im.BoolPtr(false),    units = "m/s",    color = rainbowColor(8, 4, 1),   data = function(id) return (vEditor.vehicle:getVelocity() - vEditor.vehicle:getNodeVelocity(id)):length() end, plotData = {}},
  {name = "Speed",            enabled = im.BoolPtr(true),     units = "m/s",    color = rainbowColor(8, 3, 1),   data = function(id) return vEditor.vehicle:getNodeVelocity(id):length() end, plotData = {}},
  {name = "Relative Speed",   enabled = im.BoolPtr(false),    units = "m/s",    color = rainbowColor(8, 4, 1),   data = function(id) return (vEditor.vehicle:getVelocity() - vEditor.vehicle:getNodeVelocity(id)):length() end, plotData = {}},
  {name = "Force",            enabled = im.BoolPtr(false),    units = "N",      color = rainbowColor(8, 5, 1),   data = function(id) getVELuaNodeData(id, "force", "obj:getNodeForceVector(" .. id .. "):length()") return M.nodeDataFromVELua[id].force end, plotData = {}}
@/lua/ge/extensions/core/cameraModes/external.lua
    local offset = veh:getNodePosition(node)
    local worldSpeed = veh:getNodeVelocity(node)
    if worldSpeed:length() > 5/3.6 or offset:length() < spawnAABBRadius then -- avoid fallen nodes
@/lua/vehicle/thrusters.lua
  for _, thruster in ipairs(autoThrusters) do
    local vel = -obj:getNodeVelocity(thruster.id2, thruster.id1)
    if vel > 0.3 then