Rigidbody colliders

Hey guys! Doing pretty well so far on my game, have interpolation working correctly so it’s finally “lag-free” so to speak, I’ve got a slight problem now though, I wish to start adding more objects to my map like walls and of course I need to make it so that these walls cannot be passed through so the simple solution would be to give the walls a rigidbody component and then do the same with my player object but when I do this the projectiles that my player fires end up destroying my player, even though I’m using:

Physics.IgnoreCollision(clone.collider, transform.root.collider);

I’ve no idea why this is happening as I’m pretty new to unity, could anyone shed any light?

Does your player maybe have more than one Collider attached to it? The thing about IgnoreCollision is that is only operates on a single Collider (or rather, a single pair) so if your Rigidbody has more than one associated Collider due to the character model involving more than one, that might be the problem.

For some game it’s more practical to change the layers of the various characters and bullets and then set the layer collisions up so that the player’s bullets can only ever collide with walls and enemies.