I’ve written a pretty basic character controller script and I’m having some problems with making the character rotate to match where he is moving.
Here’s the rotation part of the script:
float rotateSpeed = 10f;
transform.forward = Vector3.Slerp(transform.forward, moveDir, Time.deltaTime * rotateSpeed);
Now, this works fine as long as I am actively moving the character, however when I let go of the key, the character’s head goes back to looking forward. Am I doing something wrong? The movement works fine