Well, in general your player can collide with pretty much anything (not only bullets), so the best way is to only perform code on specific bullets. You have the Collision parameter for this.
Something like that:
void OnCollisionEnter(Collision col)
{
if(col.gameObject.name == "bullet_player1")
{
// STUFF
}
}
↧