Hello,
I have a problem with OnCollicionEnter2D. I made a code in script of main car. After this an enemy car should be destroyed but it’s not:
void OnCollicionEnter2D(Collision2D col)
{
if(col.gameObject.tag == “Enemy Car”)
{
Destroy(gameObject);
}
I tagged the enemy car “Enemy Car”. I can hit it with my car but that’s all. What could I do wrong?