applyAccel
Definition
-- @/lua/vehicle/thrusters.lua:124
local function applyAccel(accel, dt, nodeId, angularAccel)
dt = dt or lastDt
nodeId = nodeId or (v.data.refNodes and v.data.refNodes[0].cid) or 0
clusterThrust[nodeId] = {accel, dt, angularAccel}
M.update = update
updateCorePhysicsStepEnabled()
end
Callers
@/lua/vehicle/thrusters.lua
nodeId = nodeId or (v.data.refNodes and v.data.refNodes[0].cid) or 0
applyAccel((velocity - obj:getClusterVelocityWithoutWheels(nodeId)) / dt, dt, nodeId)
end
@/lua/vehicle/scriptai.lua
posAccel = posAccel:projectToOriginPlane(up) / (dt * dt)
thrusters.applyAccel(posAccel, dt)
extForceVel = posAccel:dot(fwd) * dt