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.