Advertisement
sumguytwitches

Untitled

Aug 31st, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. function norm { parameter p0 is v(0,0,0). set u to (p0-body:position):normalized. set p1 to vxcl(u,facing:vector):normalized * 80. set p2 to body:geopositionof(angleaxis(120, u) * p1 + p0):position. set p3 to body:geopositionof(angleaxis(-120, u) * p1 + p0):position. set p1 to body:geopositionof(p1 + p0):position. return vcrs(p1-p2,p1-p3):normalized. }
  2.  
  3. when ship:status = "landed" then { set sl to 0. brakes on. set ship:control:yaw to 0. }
  4.  
  5. lock nrm to norm(velocity:surface * 1). lock steering to angleaxis(max(-30,p),vcrs(velocity:surface,up:vector)) * vxcl(nrm,velocity:surface).
  6.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement