Disable Rendering on Networked Objects?
Options
Hi everyone,
I have a game where I have a bunch of AI guards instantiated in the network. I want to implement something in the lines of if a guard is not in the line of sight of the player (i.e behind a wall) , the guard is not rendered on the screen (since the camera is above and behind the player, if the guard is rendered he can be seen behind a wall.
I tried with many ways to disable the rendered of the guard through scripts and RPC calls using gameobject.GetComponent<Renderer>.enabled = false;
but the guard is still visible.
All other things in the scene disappear when I disable their renderer, but not the guards. Any help on this?
I have a game where I have a bunch of AI guards instantiated in the network. I want to implement something in the lines of if a guard is not in the line of sight of the player (i.e behind a wall) , the guard is not rendered on the screen (since the camera is above and behind the player, if the guard is rendered he can be seen behind a wall.
I tried with many ways to disable the rendered of the guard through scripts and RPC calls using gameobject.GetComponent<Renderer>.enabled = false;
but the guard is still visible.
All other things in the scene disappear when I disable their renderer, but not the guards. Any help on this?
1
Comments
-
Same issue, same question. Not an idea?
0