Comments and answers for "Choppy rotation of character around y-axis"
http://answers.unity.com/questions/1709267/choppy-rotation-of-character-around-y-axis.html
The latest comments and answers for the question "Choppy rotation of character around y-axis"Answer by unity_ek98vnTRplGj8Q
http://answers.unity.com/answers/1709279/view.html
It looks like you are just mixing up absolute orientations and delta rotations. Your "toRotation" in your Quaternion.Slerp should be the *orientation* that you want, but you are giving it the *rotation offset* from your current rotation. The difference here, to be clear, is the difference between saying "I want to orient myself to face 30 degrees off from facing north" and "I want to turn 30 degrees to my right regardless of where I am facing right now".
**
To get your desired *orientation*, just multiply your current orientation by your delta rotation. Be careful because order matters in quaternion multiplication.
Quaternion turnAngle = Quaternion.AngleAxis(Input.GetAxis("Mouse X") * rotationSpeed, Vector3.up);
Quaternion fromRotation = playerTransform.rotation;
Vector3 euler = new Vector3(0, turnAngle.eulerAngles.y, 0);
Quaternion toRotation = playerTransform.rotation * Quaternion.Euler(euler);
playerTransform.rotation = Quaternion.Slerp(fromRotation, toRotation, Time.deltaTime * 0.2f);Thu, 19 Mar 2020 16:22:36 GMTunity_ek98vnTRplGj8Q