AI moving only around foliage

Hey Elfideo,

the monster should go outside the wheat fields

I’m assuming you mean that the monsters shouldn’t enter the wheat fields. In this case you can create a dedicated NavArea class that you’d use to mark the fields - make its DefaultCost and/or FixedAreaEnteringCost really high if you want to allow the monsters to enter as a last resort, or derive your class from NavArea_Null to mark areas where this given AI agent will never be allowed to enter.

Regarding using this with EQS just use the PathingGrid generator or PathExists test. If you use this you can even get away without creating a new area class - just use the obstacle area and in the generator/test properties pick RecastFilter_UseDefaultArea as the FilterClass - this will make points generate only on the default-area surfaces (but you’ll still have the problem of AI cutting through the obstacle area, but it depends on the distance AI needs to travel).

Let me know if it helps.

Cheers,

–mieszko