Skip to content

How to get the direction of turtle #1284

Closed Answered by Wojbie
CaryCatZ asked this question in Q&A
Discussion options

You must be logged in to vote

Simplest way to get direction of turtle is to use gps api to get turtle position. Move 1 block forward and use gps 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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CaryCatZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants