FEnvQueryTask
The behaviour-tree face of an environment query: the native task "RunEQSQuery" (assetRef = the .eqs, key = the blackboard vector that receives the winning point; "EQSTarget" is read as the query's Target when set). Success with the point written, Failure when the query has no survivor or the asset cannot be loaded. The asset is cached per node.
- Module
- AINavigation
- Header
#include "AINavigation/EnvQueryTask.h"- Namespace
Mowo
MakeAsync is the RunEQS node: it submits to the world's EnvQuerySystem and stays Running until the time-sliced query answers, cancelling it on abort. A world with no EnvQuerySystem runs the query synchronously instead.
Public functions
| Returns | Name | Description |
|---|---|---|
BT::NodePtr | Make | |
BT::NodePtr | MakeAsync | |
void | RegisterBehaviorTreeTask | |
void | PumpService | One service tick: collect the answer of the query in flight (writing the winner to resultKey) and submit the next one. |
bool | BuildAgentRequest | Fills request for the agent the tree drives, reading the target from targetKey (a vector or an actor). |
Function details
Make
static BT::NodePtr Make(const std::string& assetPath, FName resultKey, FName targetKey)MakeAsync
static BT::NodePtr MakeAsync(const std::string& assetPath, FName resultKey, FName targetKey)RegisterBehaviorTreeTask
static void RegisterBehaviorTreeTask()PumpService
static void PumpService(BTContext& ctx, FEnvQueryServiceState& state, FName resultKey)One service tick: collect the answer of the query in flight (writing the winner to resultKey) and submit the next one.
BuildAgentRequest
static bool BuildAgentRequest(BTContext& ctx, FName targetKey, uint32_t seed, World*& outWorld, FEnvQueryRequest& request)Fills request for the agent the tree drives, reading the target from targetKey (a vector or an actor). False when the agent cannot be found.