Find out whether the bot is rotating left or right

You just need to consider this as an exception.
If the previous value was close to 180 (-180), and then changed sign - then the transition has occurred and the actual change in value in the other direction should be interpreted in the opposite way.

It will indeed break if you turn more than 360 degrees in one frame, but I don’t think the bot should do that. :sweat_smile:

1 Like