EQS Query won't filter out results

Hi, I have a simple EQS query to get the closest target for my AI. The problem is it looks like actually fire only once while executing constantly.

The idea is that I have a task which runs EQS to get target in range and set AI state depending on if target is found or not. Currently it returns the same initial result independent of player posiion.

Current cases:

  1. Player initially in range of AI. AI gets target and start attack. FINE. But when I move out of range EQS still returns the player as valid target in range. BAD.
  2. Player initially not in range of AI. AI won’t get target even if player will get in range. BAD

I need help understanding what I’m doing wrong.

This is a BT tree. I use task twice. One to get started and one to update state of the target. I see that second call is being executed with positive result printing ‘Hello’.

This is a task to search and set target. Always getting ‘Hello’ wall here.

This is EQS query.Tried different variations with/without additional distance test but had no luck to fix it.


Solved. The problem was quite subtle. EQS was working fine. The problem was that actors do not have Static Mesh set as ROOT object in BP which caused Actor location to not be updated according to Mesh location. Apparently, EQS use Actor transform for its tests.