Detect bullet collision with the main player


I have a bullet system, and I have to detect the collision between two box colliders (the bullet and the player), because if the bullet collides with the player its trayectory change and does weird thing like go in a spiral way.

I have one way to do that, and is active the box collider when passes a few seconds. But I don’t like that. So I have another form that doesbn’t work, because, when I enable isTigger, the collision names dissapear and I can’t retrieve any information from OnCollisionEnter.

So what can I do?

Thanks in advance.


void OnCollisionEnter(Collision col){

if(col.gameObject.tag = “Player”){

col.HP -= Damage;




in theory this should say “if this (bullet) hits the player, the player loses health, then the bullet is destroyed” if you need help still, i will gladly help, as i am doing this from memory.