How to force AI to don't walk in certain areas?

Hello,

I ve set a “vampire” ai who desintegrate if it walks on light, the problem I have is to tell the AI it can take another path instead of walking in the light, I’ve tried nav modifier volumes but it keep walking in even if there’s other path

The light detection is just a line trace by channel set max distance with light radius - 10%, I wonder if I can use this like a blocking system?
Thanks for your help

There are actual blocking volumes you can use to prevent AI from roaming where you don’t want them to go.

Yes but I’d like it to walk in if there’s no other path to reach the player.

I know it’s nav modifier volume I need to use but I can’t set it up properly, I’ll figure it out soon.

What I really can’t find the logic to is:

I throw a glowstick which hurt the AI if in it’s radius, How can I tell the AI to walk away when it’s in contact, I’ve tried, I can tell it to walk to it but can’t figure out how to do the opposite.

I forget which tutorial there was but Unreal had one out which showed you how to basically create a volume (i think it was the blocking volumes) where the “cost” of traversing the volume was increased or decreased based on an editable value. So in essence you could tell the Navigation that it is ok to walk through the volume BUT in the calculations of the “best/optimal path” consider this area as 2 or 3x as costly as it normally would be. This way the AI would attempt to walk around the area if possible but if not it would go through it.

You can set cost on navigable mesh. Ai will select low cost way first. I know, this is no full answer, but this is solution, you can look for it in docs, I’m working now on different project part and I can’t provide full solution from memory.

I’m sorry I don’t have the add comment and can’t even vote or set an answer as correct, it tells me request method not allowed… I can’t on all of my topics but can on others. Whatever.

How do I set the cost in value? All I have is Obstacle, Lowheight and Null cost, Obstacle works, I’ll have to add one under every light, and switch between obstacle and default depending if lights are On or Off. I don’t know about performances because I’ll have to set my navmesh generation on dynamic.

And I can’t set it with the glowstick because I can’t guess where it’ll land, I simply need to find a way to tell the AI to move out of its radius.

I’ve set a light trace by channel in the lights/glowstick BP’s, I wonder if I can use it to set the whole thing up,