Spawning an actor that blocks AI but not player with a blueprint.

What I am asking may not be possible to do, but I will give it a try.

I am creating levels from a database. This means spawning actors. This also means I have no access to blocking volumes or changing the navigation mesh bounds. I can make a blocking actor and set collisions. The ignore collision ‘pawn’ setting allows the player to go through, but the AI as well.

I was just wondering if there is a way to block the AI and not the player. I have found nothing on the topic so I assume this just isn’t possible.

You can add actors to collision-ignore-list in any primitive component.

Example :

Thank you so much. I will try that.

The only thing is I cannot cast to the player as it changes throughout the game. That has been another issue I have been struggling with. If you or anyone can provide a way to avoid casting to the player, perhaps with interfaces that would be awesome. Thanks again.

I really doubt your PlayerController class is changing throughout the game. You might be mixing it up with the pawn/character class.

Regardless, even if it does, all your player controller classes should still extend the PlayerController base class, while all AI controllers should extend the Controller/AiController class.

Alternatively, you can check like this, which in fact is even better :woozy_face:

Thank you again. The Branch goes to the GetAllActorsWithTag node I assume. I will try this. Will update.

Works like a charm. You are the best. Thank you so much.