I’ve been trying to think of a workable solution to my problem - a solution that won’t be incredibly expensive.
basically I need to work out if one of many many locations (cover positions) will involve the AI moving past the player, and invalidate them if that’s the case. A simple line check is not good enough - there are many edge cases that won’t work.
Next I thought I could calculate a search to each point and loop through every point on every search path. If any of them go past the player (line check) then that cover is invalid. This works, but it’s too expensive.
So next I thought of the navmesh. Really what I want to do is before the search starts - I invalidate the navmesh behind the player (from the point of view of that agent) This means that any positions behind the player and any that would involve moving through this are invalidated. This seems like a nice solution.
So a few questions -
1, is this possible?
2 - will it be too inefficient to work?
3 - if the answer to 2 is yes, does anyone have any ideas for solutions to this problem? it’s a tricky one.