How to STOP Bullets Hitting Your Own Player in Unity
Are your projectiles in Unity colliding with the player who fired them? 🎯
This is a super common problem — bullets or raycasts instantly hitting your own collider.
There are several ways to fix it:
Using Project Settings → Physics 2D → Queries Start In Colliders
Ignoring the shooter’s colliders with Rigidbody2D.GetAttachedColliders
Using Physics2D.IgnoreCollision when spawning projectiles
Entertainment
#unity stop bullets hitting
#unity player hit by own bullet
#Rigidbody2D.GetAttachedColliders
#Physics2D.IgnoreCollision