Getting Smooth Response between Horizontal Snapping
I currently implemented so that my Character leans in the direction he is walking on Horizontal Layer. So if he presses ‘D’ he leans to the right and ‘A’ he leans to the left.
I got that working, but: If i am in the state of leaning in on a specific side, but press the Camera other side its snapping to 0 and then moves on leaning to the other side.
I can imagine using some Quaternion.Lerp or some Mathf. for smoothing out rotation but i don’t really know how.
Here’s the code: