How to have enemies not go through a certain wall and let only the player pass through?
Imagine a square and having moving enemies that follow the player when he enters and they chase you. The player should be able to pass through a wall but not the enemies. There is a box with a little opening at the north side, and that's the part where the player should be able to pass but not the enemies. I have no idea how to do this, please help me. The player should be able to pass through a collider but not the enemies. If you could show me a script or direct me to something similar to this that would be great.
Answer by hexagonius · Jan 31, 2017 at 09:09 PM
assign the Player and the enemies different layers. assign the walls the same layer as the enemies. under Edit Prohect Settings Physics, remove the tick on the collision matrix between these layers.
What should they be called? Also are layers similar to tags? Also I couldn't find the collision matrix. If you could direct me to a video or something that would be great. I tried your thing but couldn't find what you said about collision matrix.
Answer by AlejandroBoss · Feb 02, 2017 at 07:02 PM
It helped, but a little bit. I didn't understand it too well. Could you maybe explain it in a different way?
Your answer

Follow this Question
Related Questions
URGENT!!! Colliders don't respond/move with imported Maya animation? 3 Answers
How to add avoid the script to overwrite camera collision? 0 Answers
Boolean check time in collider 1 Answer
GameObject not colliding properly with a collider! 3 Answers
Why is my trigger collider acting like a normal collider? 1 Answer