- Home /
Camera of multiplayer game
I am making a simple multiplayer game through the LAN-network. Now I have a problem with the cameras.
The question is very simple, when a Ghost unit (in StarCraft) change to invisible mode, you can see it transparent, but enemy will see nothing. The Protoss is the same. If they stand enough, they will become invisible (all of unit). So how can I do that with my game?
How can I tell a camera know that which way the invisible player should be render? I really don't know about this so I hope someone can help me.
Thanks for reading.
From my experience the camera knows that they are there, but chooses to not render them. Im sorry i cant help any more, im still learning Unity myself. $$anonymous$$aybe you could have flags that toggles on and off and the camera checks these before rendering?
Answer by Razouille · Mar 13, 2014 at 08:10 AM
You can use the culling mask dependent of each camera with the layerMask like this : https://docs.unity3d.com/Documentation/ScriptReference/Camera-cullingMask.html
You have one example here : http://answers.unity3d.com/questions/348974/edit-camera-culling-mask.html