Environment Query System Overview

Overview page for Environment Query System.

Choose your operating system:




The Environment Query System (or EQS for short) is a feature within the AI Tools in Unreal Engine 4 (UE4) that can be used for collecting data about the environment. Then, through the use of a Generator , the system can ask questions about that data through a variety of user-defined Tests , returning the best Item that fits the types of questions being asked. Some example use-cases for EQS could be to find the closest health pickup or ammo, figure out which enemy is the highest threat, or to find line of sight to the Player (an example of which is shown below).


The conceptual idea and theory behind EQS comes from Unreal Engine 3's Environment Tactical Query (ETQ) system which you can read more about in the following article, Asking the Environment Smart Questions .

EQS Basics

EQS Query assets can be created in the Content Browser and can be edited inside a special Environmental Query Editor . The Environmental Query Editor is a node-based editor where you can add a Generator node to produce Items, add your desired Tests to run on those Items, and the Context in which to run them. UE4 supplies of number of Generator types by default, however you can create your own custom Generators through Blueprint (or C++ for even faster execution).


Above, we add a Distance Test to our existing Generator.

Similar to Generators, there are several different types of Tests you can run to filter and (or) score the Items returned. Unlike Generators, custom Tests can only be created through C++. Multiple Tests can be added to a Generator and is a common practice to narrow down the Item results that are returned. The order in which you add Tests to a Generator does not matter as filter Tests are done before scoring Tests. This is done so that less Items are returned and need to be scored. Refer to the table below for the type of tests.

Node Type



This produces the locations or Actors, referred to as Items , that will be actually tested and weighted.


These are a frame of reference for the various Tests and Generators.


These are how the Environment Query decides which Item from the Generator is the "best" option.

Please refer to the EQS Node Reference page for more information on each type.

Once you have set up your EQS Query, you can run it through a Behavior Tree using the Run EQS Query Task node.


For a full walk-through of creating and using an EQS Query, please see the EQS Quick Start Guide .

Enabling EQS

Before you can start working with EQS, you will need to enable it from the Editor Preferences menu.

  • Under Editor Preferences > Experimental > AI section, enable the Environmental Query System option.


Previewing an EQS Query

You can preview the results of an EQS Query inside the Editor, where weighted/filtered results will be represented by debug spheres.


In the image above, we debug an EQS Query that returns a location which provides line of sight to the Player Character in the Level.

Please see AI Debugging or EQS Testing Pawn for more information.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey