To make a nice and smooth rotation to the shortest direction use this logic based on event tick
If you need to find the side where the target (left or right) you might use something like that