How to make a volumen block that enemy can’t pass through but player can?

I am creating a maze with “safe zones” in which the enemy cannot pass. If I use the BlokingVolume the Player can’t pass either. I have tried to discriminate the collision according to the Actor’s Tag, but I have not found any solution. Help :sob:

Hey there @D.Suarez! Welcome to the community! So there’s tons of ways to go about this. You could create a blocking volume and a custom collision for the enemies, then only allow the blocking volume to block the enemies. However this won’t stop them from wanting to navigate through it, so you’d have to set the blocking volume to be able to block navigation mesh as well. Quick example:

Create a new Enemy collision object channel in Project Settings->Engine->Collision->Object Channels:

Set the collisions on the blocking volume to custom and only have the enemy collision blocked

Then set these two settings on:

However this can affect your player’s navigation too if you’re using navmesh for them.

1 Like

If your player (or maybe other non-enemy actors) still need navmesh intact, you may want to look into NavModifier volumes. You can create NavArea classes that allow you set up rules on areas of the navmesh, such as traversing cost or which agents may walk over it and assign them to NavModifier volumes.

Hope this helps :slight_smile:

2 Likes

“What are collision channels” for $500.