My collision is not detecting

I want a message to display when my player hits an obstacle but the only collision detected is with the ground. This is the collision script I attached to the player.
using UnityEngine;

public class PlayerCollision : MonoBehaviour {

void OnCollisionEnter()
    Debug.Log("we hit something");


First thing I would do would be set the debug.log to also log what it hits. That was you know for sure what your object is hitting.

Next, are you sure that all the object have colliders?? If they do, are they box/sphere/capsule colliders? Unity seems to have some issues when it comes to mesh colliders and detectoin.

Finally, depending on what you are trying to do, set one to be a trigger. You can use the OnTriggerEtner function then.