how do I make one player not see an object but another can?

I am working on a first person VR multiplayer game but the player can see the player model, my first thought was layers. when I tried that, it did hide the player model from the camera but other players also cant see the player model. how do I make it where the player cant see its own player model but other players can see it?

By setting the layer on a per-client basis.

Let‘s say the tag to hide the first person view model is PlayerViewModel. Apply this tag to the camera layer mask so objects with this tag won‘t render. But do NOT apply this tag to the player model prefab.

Instead, in a NetworkBehaviour script on the player object add the OnNetworkSpawn method. If IsOwner is true you will then apply the PlayerViewModel tag to the object(s) that contain the first person viewmodel MeshRenderers. This ensures that only the controlling (owner) player will not see his own view model but everyone else will see it.

1 Like