How do I make one player invisible to other cameras, but it is still visible to that player’s camera?
I want to make an ability for each player to be invisible to all other cameras other than themself, so do I have to add a layer for each player? That does not sound very efficient.
Player Per Layer works great until you have more than 8~12 players. But here’s another approach. Unfortunately, not available for URP/HDRP.
If each player is running on their own client, then just have visible layer and invisible layer, and the local pawn is the only one on the visible layer.
If you have split screen for multiple players on the same client, then you just expand this to say up to four visible layers (up to four local players on a single client) and a single invisible layer for all other pawns.
If you don’t support split screen (two or more local players on a single client), you could just remove the mesh from those pawns that are not local. That would be my first approach.