Been racking my brain about this but can’t figure it out.
How do I allow the player character to pass through walls/ojects of the same colour/material but trigger a death animation/game over screen if it hits a wall/object of the same colour/material?
To add a Layer go to Edit > Project Settings > Tags and Layers. The Inspector will show the tags and layers. You can also add a Layer by going to an Object and in the Inspector Click the Layer dropdown and go to Add a Layer.
To make objects pass thru each other depends on if its 2D or 3D. For 3D go to Edit > Project Settings > Physics and for 2D go to Edit > Project Settings > Physics 2D. The Inspector should show Physics Settings. At the bottom there should be a Matrix (Layer Collision Matrix) with some checkboxes. Uncheck the Layers you do not want to collide. Sorry for some reason I cannot add any pictures or docs.