Collision issues

Hello. In my game I want to establish proper collision between my character and a door. But I am not getting any collision detection at all. Here is the code for the collision detection:

void OnCollisionEnter(Collision col)
	{
        if (col.gameObject.name == "Player")
		{
			CurrentDoorState = DoorStateEnum.OPEN;
            Debug.Log("Detected collision between " + gameObject.name + " and " + col.collider.name);
		}
		else
		{
			CurrentDoorState = DoorStateEnum.CLOSED;
            Debug.Log("No collision between " + gameObject.name + " and " + col.collider.name);
		}
	}

I attached the script onto the door object, then made sure it has a box collider. In addition, I have my player with a Character Controller and Rigidbody components attached to him. Can anyone please help me figure out what I am doing wrong? Many thanks in advance!

I think you should use Raycast instead.

Place the script on the door game object and where the collider is. Here you go:

#pragma strict

var DistanceToObject = 1;
var Player : GameObject;
var Door : GameObject;

function Update()
{
var ray: Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
var hit: RaycastHit;
	if (Physics.Raycast(ray, hit, DistanceToObject))
	{
		if(hit.collider.gameObject == Door)
		{
		Debug.Log ("Dat Door");
		}
	}
}

Why aren’t you using triggers?
Add another box collider to the door, make it bigger than the normal collider and set it as Trigger. Then you can use this:

function OnTriggerEnter (other : Collider)
   {
   if (other.name == "Player")
      {
      ...
      }
   }

EDIT: For the spin problem, make sure that “Freeze Rotation” x,y,z are checked on the Rigidbody of the character.