The Environmental Query System
- In the next stage he employs the EQS.
- This system consists of several components.
- The Context for the query is the environment where the query will occur.
- There are several different contexts defined.
- EnvQueryContext_Querier - the thing that is running the Btree
- EnvQueryContext_Item - an item or a position
- EnvQueryContext_BlueprintBase
- This lets you specify an actor/or set of actors to follow
- Or a series of points.
- You need to override one of the provided functions.
-
- Just set it to follow the player character.
- Or in this case, the AI testing pawn.
-
- The testing pawn lets you debug the EQS
- Then you can build a number of EQS Queries
-
- A query can be simple or very complex.
- You start by generating a search pattern with a generator.
- This can produce locations or actors.
- ActorsOfClass - look at all the actors of a given class.
- Composite - Use several generators.
- Or a series of points
-
- Based on the context given.
- You then apply one or more Tests
- The purpose of these tests is to eliminate points/targets specified in the query.
- This happens in two ways.
- Points can be filtered, or eliminated from the search
- Points can be scored or given a numeric value.
- Or both.
- There are quite a few options for both filtering and scoring.
- The tests include
- Distance to an object.
- The Dot product between two vectors. (Take Graphics)
- Gameplay Tags applied to objects.
- Overlap - are items within a given bounds.
- Pathfinding - can you get there?
- Trace- can the item be seen from the context.
- All of this combines to make a new node in Behavior tree