OnCollisionEnter not getting called

I somehow lost a scene I was setting up and now I am rebuilding it. The issue is this time around OnCollisionEnter is not getting called when the player collides with the enemy. I created a separate scene to test just this, here is what it consists of: Player (pill with CharacterController) a cube for the ground and a second cube with a box collider. After some research i found that if the cube has a rigidbody attached with IsKinetic disabled it would detect a collision, at least with the ground. Otherwise I have not gotten anything out of it, I am developing this for iphone and it was working before without a rigidbody. What could I be doing wrong here.

The code is just a simple OnCollisionEnter function call with a standard out.

Thank You
TWest

Can you please post your code here? Do your objects both have colliders?

This is the code attached to the cube, which has a Box collider.

using UnityEngine;
using System.Collections;

	public class ColliosionTestDebug : MonoBehaviour
	{
	
		public void OnCollisionEnter(Collision player)
		{
	    	print("collision has occured"); // debug
    	}
	}

The player has an unaltered CharacterController attached to it which has a capsule collider.
The collider component is linked.
http://unity3d.com/support/documentation/Components/class-CharacterController.html

I’ve had some weird problems with collisions in the past lol xD
One thing that you should check is that the scale of the objects is not to big, and also they are not to small!
I know it sounds weird but try messing with the scale and checking then. May not work but I know it has in the past.

That doesn’t seem to have any effect. After doing further research I found I need to have at least 1 of the object to have a rigidbody to use OnCollisionEnter. After demoing (adding a rigid body to the enemy cube, the IsKinematic is unchecked) this up it seems to work but only when the object collides with the box collider that the ground has. I added some extra code so what i have is now:

public void OnCollisionEnter(Collision player)
{
     print("collision has occurred");
     if(player.gameObject.tag == "Player")
     {
          print("enemy has collided with player");
     }
}

So I can see it printing the “collision has occurred” but not “enemy has collided with player” when the CharacterController hits it. I have tried it with gravity off and Is kinematic off as well as both one and all other combinations.

Any help would be greatly appreciated.

Thank You
TWest

if you are only checking to collide with the player

var myPerson : GameObject;

function OnCollisionEnter(myPerson : Collision) {
print(“collision with player”)
}

you could use the Inspector or a function start and find tags to setup the player