OnCollisionEnter doesnt work

Hi guys,

i’ve got a problem to detect a collision. I have a ball and an enemy in my game. Both of them have a collider and a rigidbody. The Script for the collision is inside the ball gameobjekt.

My script is:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BulletScript : MonoBehaviour {

   void OnCollisionEnter(Collision collision)
    {
        if(collision.gameObject.tag == "Enemy")
        {
            Debug.Log("Treffer");
        }
       
    }
}

I don’t rly know if its a scripting problem or another one.

My inspector of my gameobjects and my physik manager are uploaded here.

Thx for helping.



I can’t immediately see a problem.

If you set a bullet moving slowly towards the enemy and you put a breakpoint on line 9 in the script above, does it break into the debugger on contact or does it not go into OnCollisionEnter() at all?