Look Where You're Going

I have a player that can walk around in a 3d space. The Player is just a Capsule, with a regular Capuse Collider. The controls are simple so far.

var dir = Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
transform.Translate(dir*Time.deltaTime*10);

The problem is I need the player to look where its going. I’ve tried LookAt(dir), I’ve transform.Rotate(0, hor+dir,0) but both get me really strange rotations. I’ve even tried

var rot = Quaternion.Euler(dir);
transform.rotation = Quaternion.Slerp(transform.rotation, rot, Time.deltaTime);

But that doesn’t do anything.

Can you help me?

Have you tried making the camera a child of the capsule? That should turn the camera when you turn the capsule.

Try this:

transform.forward = Quaternion.Slerp(transform.forward, dir, 0.1f);

Thanks for trying guys, but I found this solution How to turn and face the direction I'm moving using CharacterController? - Questions & Answers - Unity Discussions. I wasn’t planning on using the CharacterController but it seems to be the smart thing to do at the moment.