Environment queries (EQS)
AI & gameplayBuild Environment Query System assets: generators, tests and contexts.
What it’s for
The Environment Query System (EQS) is how Unreal AI answers spatial questions during play: "where
is the nearest cover?", "which of these points can see the player?", "where can I stand that is
close but not too close?". Each answer comes from an EQS Query asset that generates
candidate points or actors, then filters and scores them. Your assistant builds those assets for
you, so you describe the query in plain language instead of clicking through the EQS editor.
Ask it to create a query, choose where the candidates come from, and add tests that filter and rank them. It can also point a query at the right reference, such as the AI itself or a target actor, and tune how harshly each test rejects items and how it weights the rest.
This area covers the query assets only. To make an AI actually run a finished query as part of its decisions, see Behavior trees.
Limits
A few options, such as scoring curves, are rejected on UE 5.6. Check the query after each change.Things you can ask
Create a query that prefers nearby points
You get a new query that scans a grid around the AI and ranks points by how close they are.
You: Make an EQS query that scans a grid around the AI and prefers nearby points.
Created EQS_FindNearby in /Game/AI/EQS. It generates a grid of points and scores them by distance.Tune how a distance test weights results
Closer points win, and the score stays inside the range you set.
You: On that distance test, prefer closer points and cap the score range.
Nearer points now score higher, with the score clamped to 0–2000. The query is saved.Filter out points outside a range
Points that are too close or too far are thrown away before scoring.
You: Reject any point closer than 200 or farther than 1500 units.
Added a distance filter. Points outside 200–1500 units are now discarded.