Hey everyone, I really new to unity and am having a problem with getting my player character to continue to face the direction is traveled. It faces the right way when moving, but then snaps 90 degree left, right, forward, or back. I’m attempting to use the Character Controller for scripting this but the rotation has me stuck. Thanks.
public class ChefMovement : MonoBehaviour
{
public float moveSpeed;
CharacterController ch;
// Start is called before the first frame update
void Start()
{
ch = GetComponent<CharacterController>();
}
// Update is called once per frame
void Update()
{
float x = Input.GetAxis("Horizontal") * moveSpeed * Time.deltaTime;
float z = Input.GetAxis("Vertical") * moveSpeed * Time.deltaTime;
Vector3 movement = new Vector3(x,0,z);
ch.Move (movement);
if (movement != Vector3.zero) {
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(movement), 0.15F);
}
}
}

The T value was the issue. I lowered it all the way to .01f and now its great
– Logster1217