Silasko

gps vector

May 8th, 2022 (edited)
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. local a = vector.new(gps.locate())
  2. local b = vector.new(20, 85, 40)
  3. local c = a - b
  4. --displacement in the x direction:  c.x
  5. --displacement in the y direction:  c.y
  6. --displacement in the z direction:  c.z
  7. print(c)
  8. if x < 0 then
  9.     print("Caller to East")
  10. else
  11.     print("Caller to West")
  12. end
  13. if z < 0 then
  14.     print("Caller to South")
  15. else
  16.     print("Caller to North")
  17. end
Add Comment
Please, Sign In to add comment