Environment Query System Overview

Overview page for Environment Query System.

Choose your operating system:

Windows

macOS

Linux

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).

EQS_OverviewFindPlayer.png

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).

EQS_AddingATest.png

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

Description

Generator

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

Contexts

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

T**ests**

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.

EQS_OverviewRunEQS-1.png

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.

    EQSUG_EnableEQS.png

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.

EQSUG_Preview.png

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.

언리얼 엔진 문서의 미래를 함께 만들어주세요! 더 나은 서비스를 제공할 수 있도록 문서 사용에 대한 피드백을 주세요.
설문조사에 참여해 주세요
건너뛰기