Seems that i`m getting old. I cannot figure out what to do here
I have a car. I want to control it with the mouse. Always look at mouse is not really useful to control a car, because it rotates too fast. So i need to buffer it. Means i need a slowly rotation towards the mouse position.
What i`ve done in the attached file is simple. I have added another active. This one always looks in direction of the mouse. And then i have added two simple events. When direction of active greater direction of car, add 1 to direction of car. And vice versa. It works fine as long as i avoid to go through the direction 31 or 0
But then it fails. Because in the area 31 and 0 the value snaps from 31 to 0 and from 0 to 31, and the car rotates the whole 360 degrees instead the missing 1 direction then.
Has somebody an idea how i can bring the car to rotate the shortest direction, means the missing 1 direction instead to rotate the other 31 directions?