Yeah, I know that EQS is super experimental, so I don’t expect quick fix.
Anyway, I have query which finds a position for AI, from where he can shoot player. I want to get the closest location from player character, from which eye contact is possible. EQ looks like this:
It used to work well in UE 4.4. I believe that the problem arise with optimization in EnvQueryInstance.cpp introduced in commit https://github.com/EpicGames/UnrealEngine/commit/c18a424666268bd409c441197d445d5f4e0576d7.
From my understanding the idea is, that if the last test is filter, we don’t need to test all items. It is sufficient to take the current best item and test it. If it passes the test, we are done, otherwise second best item is tested, etc.
The problem is that items are not sorted between tests, so instead of taking the current best item, the last test just takes first generated item. As a result the distance check in my example has no effect.
Can someone give me advice, how to work around this issue, preferably without changing engine code? Or maybe I don’t understand the code correctly and I’m just doing something wrong?