Open guillermofbriceno opened 4 months ago
Almost needs to move out of the way of the players cursor, items could also be visible through her
I got an idea. You can place NavMeshModifierVolumes on the level. These can define an area of the navmesh to be something else. Say lava. So, you can adjust the cost of going into these ares or avoid them entirely. But if we increase the cost of these areas infront of each item, granny will avoid those areas. If we are creative we can force granny to walk to either side of the item. This plus a marker to override the default location for granny to walk to and we can sorta ensure she gets less in the way.
Blue in this picture is regular navmesh. Pink inside of those volumes is 5x the cost. Granny now walks around the pink zones, only venturing through when no other options exist or its cheaper.
Dropping something uses the same location override, but can be strange sometimes, granny will leave the car to poke slimes
Added a check to see if UI is clicked and prevent the generic goto if this is the case. Granny still goes to most things. Pickup things, use things, etc.
@bugmage