Hi unity community .
I trying to make a collision, but she works only in the start of game.
i using
void OnCollisionEnter(Collision col){
if(col.collider.tag == "Player")
{
GameObject.Find("Player").GetComponent<PlayerController>().PlayerHealth = 0;
}
}
}
But this not working.
How to call OnCollisionEnter on Update function, or tell me other form to solve this.