Hello,
in my current game project I need to rotate the camera around a certain spot.
Let’s say, my camera is currently rotated to (0,0,0) and I want to rotate it to (0,72,0). Normally I’d use somthing like:
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(0,72,0), Time.deltaTime);
This works just fine, but now I’d also like to decide, whether the camera will rotate to this position clockwise or counter clockwise. Is there a way to make sure the camera will only rotate to the right or to the left?
I guess I need to come up with a method, which takes care of this, so any help will be greatly apprecated.
Thanks in advance.