I’m create a new area and i’m add the walls and doors. I’m add a guard. Play the game and i’m going to the guard. He look at me and chase me. WoW! The guard have a special power - he can pass the walls! Where is problem? On the Stealth area witch rooms and cameras he don’t pass the wall, on my - he can … LOL PLease, help me!!
I found a slight oversight in the Stealth Tutorial that causes the guard (enemy) to pass right through the doors without opening them. The tutorial has you tag the robotGuard asset with the tag ‘Enemy’, but you also have to tag the child element called
char_robotGuard_body as ‘Enemy’ too, so the script will recognize it.
Then DoorAnimation will work with the OnTriggerEnter() statement of ‘else if(other.gameObject.tag == Tags.enemy)’. The doors will also open automatically when the guards walk by. Hopefully, your player is not visible inside the room then!