VE Lua Documentation

Press F to search!

applyForce

Definition


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

Callers

@/lua/vehicle/controller/playerController.lua

local function applyForce(node1, node2, force)
  obj:applyForce(node1, node2, force)
local function applyForce(node1, node2, force)
  obj:applyForce(node1, node2, force)
end
  --yaw
  applyForce(stabilizationNodes.topFront, stabilizationNodes.topLeft, yawLeftForce)
  applyForce(stabilizationNodes.topRear, stabilizationNodes.topRight, yawLeftForce)
  applyForce(stabilizationNodes.topFront, stabilizationNodes.topLeft, yawLeftForce)
  applyForce(stabilizationNodes.topRear, stabilizationNodes.topRight, yawLeftForce)
  applyForce(stabilizationNodes.topFront, stabilizationNodes.topRight, yawRightForce)
  applyForce(stabilizationNodes.topRear, stabilizationNodes.topRight, yawLeftForce)
  applyForce(stabilizationNodes.topFront, stabilizationNodes.topRight, yawRightForce)
  applyForce(stabilizationNodes.topRear, stabilizationNodes.topLeft, yawRightForce)
  applyForce(stabilizationNodes.topFront, stabilizationNodes.topRight, yawRightForce)
  applyForce(stabilizationNodes.topRear, stabilizationNodes.topLeft, yawRightForce)
@/lua/vehicle/thrusters.lua
      end
      obj:applyForce(thruster.id2, thruster.id1, t)
    end
  for _, thruster in ipairs(thrusterState) do
    -- applyForce(node1, node2, forceMagnitude)
    obj:applyForce(thruster[2], thruster[1], thruster[3])
    -- applyForce(node1, node2, forceMagnitude)
    obj:applyForce(thruster[2], thruster[1], thruster[3])
  end
  for i = impulseCount, 1, -1 do
    -- applyForce(node1, node2, forceMagnitude)
    local thruster = impulseState[i]
    local thruster = impulseState[i]
    obj:applyForce(thruster[1], thruster[2], thruster[3])
    local ttl = thruster[4]