Problem with Rotation and Character controller

I have a problem with the rotation of my character, when rotating my character, only that by turning the grid and not the capsule collider.

show the images here: alt text

alt text

alt text

and my code

var tempDir1 = new Vector3(objetivo.transform.position.x,0,
                                            objetivo.transform.position.z);
    var tempDir2 = new Vector3(transform.position.x,0,
                                            transform.position.z);                                      
    var dir = tempDir1 - tempDir2;
    var rot = Quaternion.LookRotation(dir, Vector3.up);
    transform.rotation  = Quaternion.Slerp (transform.rotation, rot, Time.deltaTime * 20); 
    transform.rotation.x=0;
    transform.rotation.z=0;
    dir.Normalize();

The problem is that your mesh isn't set up correctly in the modeler. The origin in your modeler will be the pivot point on your mesh, so you need to go into your modeler and move the mesh so that the y-axis goes through the center. Then you will need to re-offset the character controller.