I am trying to make a game where the player can only rotate to 4 angles. Something like this
I cannot use
Quaternion.Rotatetowards because the player's position is not constant, but I don't have the problem with movement. The problem I am having is that when I use
transform.Rotate of 90 degrees it creates a sudden rotation. I would like to have that rotation smooth. I have tried using Slerp but I don't think I quite get the syntax I need to use.
Quaternion.Slerp interpolate between two different positions, when my player turns I would like him to keep his current position, and only turn his "face" towards the desired position. I would appreciate the help. Thanks.