Ozin

EVA orbital

Mar 9th, 2021
586
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set tp to target:rootpart.
  2. lock offset to tp:facing:vector * 0.5 + tp:facing:topvector * 0.1.
  3. lock approach to tp:facing:topvector.
  4. set eva to addons:eva.
  5. set sep to 0.
  6. set sl to 0.
  7. set tVes to target.
  8. eva:TURN_TO(-approach).
  9.  
  10. when true then {
  11.     set rel_v to velocity:orbit - tVes:velocity:orbit.
  12.     set wv_pos to (tp:position + offset + approach * sep).
  13.     set wanted_v to wv_pos:normalized * min(sl , (wv_pos:mag * 0.25)^0.55).
  14.     set ve to wanted_v - rel_v.
  15.  
  16.     if vdot(facing:topvector,ve) < -0.05 eva:move("forward").
  17.     else if vdot(facing:topvector,ve) > 0.05 eva:move("backward").
  18.     else if vdot(facing:vector,ve) > 0.05 eva:move("up").
  19.     else if vdot(facing:vector,ve) < -0.05 eva:move("down").
  20.     else if vdot(facing:starvector,ve) < -0.05 eva:move("left").
  21.     else if vdot(facing:starvector,ve) > 0.05 eva:move("right").
  22.     else eva:move("stop").
  23.     return true.
  24. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×