Advertisement
sumguytwitches

land on flatspot

May 2nd, 2021
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. Lock steering to heading(90,90).
  2. set talt to altitude.
  3. lock throttle to (-verticalspeed - altitude+ talt )/40.
  4. stage.
  5. wait 1.
  6.  
  7.  
  8. Set tar to flatspot.
  9.  
  10.  
  11.  
  12. Lock sl to 5.
  13. lock tv to tar:position:normalized * min(sl,(tar:distance/6) ^ 0.85).
  14. when true then {
  15. set relVelVec to vxcl(up:vector, tv - velocity:surface) / 3.5.
  16. set relVelVec:mag to min(sl,relVelVec:mag).
  17. lock steering to lookdirup(up:vector * 10 + relVelVec, facing:topvector).
  18. return true.
  19. }
  20.  
  21. when (ship:geoposition:position - tar:position):mag < 0.1 and ship:groundspeed < 0.1 then {
  22. lock throttle to (-verticalspeed - 1).
  23. wait 1.
  24. When ship:verticalspeed > 0 then lock throttle to 0.
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement