-
I want to make a automatic machine but there is a problem: I need to get the direction of turtle to resume from wrong exit without moving. |
Beta Was this translation helpful? Give feedback.
Answered by
Wojbie
Jan 1, 2023
Replies: 1 comment
-
Simplest way to get direction of turtle is to use Difference between those 2 positions will indicate in what direction is turtle facing. For example if x grows from 3 to 4 then turtle is facing positive x direction. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
CaryCatZ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simplest way to get direction of turtle is to use
gps
api to get turtle position. Move 1 block forward and usegps
api again to get its new position.Difference between those 2 positions will indicate in what direction is turtle facing. For example if x grows from 3 to 4 then turtle is facing positive x direction.