The collision matrix in Edit => Project Settings => Physics, make sure that the layers they’re both on are capable of colliding with eachother.
Make sure they aren’t marked as “IsTrigger”, because if they’re triggers they won’t send OnCollision messages, they’ll send OnTrigger messages instead.
They’re spawning inside of eachother’s colliders, either because they’re spawning too close to eachother or because the colliders are far larger than they should be.
The collider and/or rigidbody are disabled.
They’re both children of another object which also has a collider or rigidbody, in which case they’re considered a compound collider and won’t collide with eachother (or the parent).
The last four of your suggestions are currently not the case Lysander and I assume this means they are all capable of colliding with eachother:
I have no idea what could be causing it, this is very similar to a script in another project of mine and there’s no problem there. I hope someone has some more ideas :(.
edit - Oh and regarding the matrix that was posted, I believe it states they should be fine as they are both rigidbodies.
Update - Putting this into the start function I’ve discovered that even though the script is enabled on the ball not even this is being called.
Any idea why the script could be acting like its disabled when its not?
void Start () {
Debug.Log ("script started");
}
-edit something very strange is happening. It appears all new scripts are not running on objects, I created a few new tests ones and nothing is happening.
-edit Okay I tested it in a new project and still no avail. Is there something I’m doing wrong with the debug.log? I think its strange none of my debug messages are appearing, could I have disabled them somehow?
Okay making a new post just to confirm, I had accidently clicked the tab that hides the debug messages so none have been appearing. This means while I thought the function wasn’t being called I was in fact wrong. Sorry guys, thanks for the replies anyway.