I’m creating a basic 2D top-down multiplayer battle arena space game, where guns can be placed arbitrarily on the surface of a spacecraft.
Obviously I don’t want rockets to collide with the spacecraft that’s shooting them, but I do want them to collide with everything else in the game.
One obvious way to solve this is to create a separate layer for each player (Player1, Player2 etc.), and a separate layer for each player’s rockets (Player1Rocket…). But that’s clearly not a good solution because it limits the number of players the game will support.
Any other ideas?