Character Rotation

function UpdateSmoothedMovementDirection ()
{
var cameraTransform = Camera.main.transform;
var grounded = IsGrounded();
// Forward vector relative to the camera along the x-z plane
var forward = cameraTransform.TransformDirection(Vector3.forward);
forward.y = 0;
forward = forward.normalized;
// Right vector relative to the camera
// Always orthogonal to the forward vector
var right = Vector3(forward.z, 0, -forward.x);

            var v = Input.GetAxisRaw("Vertical");
            var h = Input.GetAxisRaw("Horizontal");

            if (v < -0.2)
                        movingBack = true;
            else
                        movingBack = false;
           
            var wasMoving = isMoving;
            isMoving = Mathf.Abs (h) > 0.1 || Mathf.Abs (v) > 0.1;
                       
            // Target direction relative to the camera
            var targetDirection = h * right + v * forward;
           
            if (grounded)
            {
                        // Lock camera for short period when transitioning moving & standing still
                        lockCameraTimer += Time.deltaTime;
                        if (isMoving != wasMoving)
                                    lockCameraTimer = 0.0;
                         // We store speed and direction seperately,
                        // so that when the character stands still we still have a valid forward direction
                        // moveDirection is always normalized, and we only update it if there is user input.
                        if (targetDirection != Vector3.zero)
                        {
                                    // If we are really slow, just snap to the target direction
                                    if (moveSpeed < walkSpeed * 0.9 && grounded)
                                    {
                                                moveDirection = targetDirection.normalized;
                                    }
                                    // Otherwise smoothly turn towards it
                                    else
                                    {
                                                moveDirection = Vector3.RotateTowards(moveDirection, targetDirection, rotateSpeed * Mathf.Deg2Rad * Time.deltaTime, 1000);
                                               
                                                moveDirection = moveDirection.normalized;
                                    }
                        }
                       
                        // Smooth the speed based on the current target direction
                        var curSmooth = speedSmoothing * Time.deltaTime;
                       
                        // Choose target speed
                        //* We want to support analog input but make sure you cant walk faster diagonally than just forward or sideways
                        var targetSpeed = Mathf.Min(targetDirection.magnitude, 1.0);
           
                        _characterState = CharacterState.Idle;
                        moveSpeed = Mathf.Lerp(moveSpeed, targetSpeed, curSmooth);
                       
                        // Reset walk time start when we slow down
                        if (moveSpeed < walkSpeed * 0.3)
                                    walkTimeStart = Time.time;
            }
            else
            {
                        if (jumping)
                                    lockCameraTimer = 0.0;
 
                        if (isMoving)
                                    inAirVelocity += targetDirection.normalized * Time.deltaTime * inAirControlAcceleration;
            }
           
 
                       
}

Hey,
I guess you want your guys to move forward and backward with W and S and simply rotate but no displacement with A and D. This simple code should do the trick, they are supposed to be used with the arrow pad though:

var speed = 3.0; //Speed you guy will move forward/backward
var rotateSpeed = 3.0; // speed at which it will rotate around Y-axis

function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
// this get you character controller attached to the object

//rotate around y-axis
transform.Rotate(0, Input.GetAxis ("Horizontal")* rotateSpeed, 0);

//Move Forward-Backward
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis("Vertical");
controller.SimpleMove(forward * curSpeed);

}

@script RequireComponent(CharacterController)

Let us know if that worked for you. I might have understood your question wrong.