kOS-scripts/lib/rendezvous.ks
2019-02-10 15:34:10 +01:00

15 lines
308 B
Plaintext

@LAZYGLOBAL off.
run once "lib/node".
function kill_relative_velocity {
parameter target is TARGET.
parameter tolerance is 0.1.
local relative_velocity is target:velocity:orbit - SHIP:velocity:orbit.
if relative_velocity:mag > tolerance {
execute_burn(relative_velocity).
}
}