Martin Guma
Martin Guma

Reputation: 1

OnCollision Enter not displaying a debug log

using UnityEngine;

public class PlayerCollision : MonoBehaviour
{
    void onCollisionEnter (){
        Debug.Log("We hit something.");    
    }
}

I have rigidbody on every object and I attacked the script to my object, but still not working. I am following a Brackeys tutorial and it is a little old so I don't know if something has changed about the syntax.

Upvotes: 0

Views: 52

Answers (1)

duck
duck

Reputation: 11

void OnCollisionEnter(Collision collision) {

}

Upvotes: 1

Related Questions