Choose your operating system:
Windows
macOS
Linux
In addition to the
AI Debugging
tools, the Environment Query System has a specialized type of
Pawn
class called the
Environment Query System Testing Pawn
(
EQSTestingPawn
) that enables you to check out what your Environment Queries are actually doing. The exact makeup of your Environment Query will define the size and shape of what is created, but it will always be represented as colored spheres. Spheres that are on the color scale from green to red, indicate some level of match for the various tests your Environment Query ran. Blue spheres indicate a failure or a boolean type test that returned false, such as the Trace test.
Working with the EQS Testing Pawn
After enabling EQS and creating an EQS Query you can test the data while in the Editor using the EQS Testing Pawn.
-
In the Content Browser , create a new Blueprint of the EQSTestingPawn class and give it any name.
-
Place the EQSTestingPawn in the Level, then in the Details panel, assign the EQS Query Template to test.
Given the experimental nature of the Environment Query System, the EQSTestingPawn can be very processor intensive, and making changes to its active Query Template can cause your system to hang for extremely long times. It's best to clear the Query Template property while making edits to your Environment Query.
Depending upon the content of your query, when you have the EQSTestingPawn selected in the Level, debug spheres will appear in the Level that indicate the value of a match based on your conditions. Below we use the EQSTestingPawn and test a query that yields the best possible position in the Level that provides line of sight to the Player Character. As we move the EQSTestingPawn around, the spheres update in color and value to indicate the new best match based on the position of the Player and EQSTestingPawn.
Evaluating Results
When evaluating the results of a Test using the EQSTestingPawn, the colored spheres and values indicate the level of match an item has at a given location.
-
Blue Spheres : These spheres indicate that a Test has failed at that item, so the item is completely un-weighted and culled from the results. This usually occurs when a value is filtered out, such as using a Distance Test and filtering out any Item over (or under) a range. If you don't want a value to be culled completely, you can use the Clamp options in the scoring section. Below, we have a query that is being ran to find line of sight to the Player. We have used a Visibility to cull out items where the AI would not have line of sight to the Player (represented by the blue spheres).
-
Green to Red Spheres : Spheres range in color from green to red and indicate the desirability of the Item as the best match for the specified Test. Green is more desirable than red and the number shown is the weighted score of the Item. If previewing only one Debug Step, this value will be the final value from the selected Test. Below, we use a query to find the furthest point away from the player regardless of visibility.
EQS Testing Pawn Properties
With an EQSTestingPawn selected in the Level, the following properties are available inside the Details panel.
Property |
Description |
||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Query Template |
The Environment Query that the EQSTestingPawn should use. |
||||||||||||||||||||||
Query Config |
Enables you to pass named values into the Environment Query to quickly adjust its settings. |
||||||||||||||||||||||
Time Limit Per Step |
If this value is set to anything greater than 0.0, it will cause the EQSTestingPawn to stop calculating a step at the time this property is set to. Helps to mitigate making adjustments to the Environment Query while using the EQSTestingPawn. Note: This will not reduce the time it takes to calculate the locations for the Generator , such as using a large Simple Grid with a tight Density |
||||||||||||||||||||||
Step to Debug Draw |
Shows a single debug step. May not map to the order your steps appear in the Environment Query. |
||||||||||||||||||||||
Highlight Mode |
Determines if all spheres should be shown at the same size or if the best
|
||||||||||||||||||||||
Draw Labels |
Enables drawing the weight or reason for failure on the debug spheres in the Viewport. |
||||||||||||||||||||||
Draw Failed Items |
Enables the culling of any failed tests, such as when a trace fails to find its target. |
||||||||||||||||||||||
Re Run Query Only on Finished Move |
Will only update the debug visualization in the Viewport when you stop moving the EQSTestingPawn. It's advised to keep this enabled unless you are working with a very quick Environment Query. |
||||||||||||||||||||||
Should be Visible in Game |
Makes the EQSTestingPawn, and its debug visualization, visible in the running game. |
||||||||||||||||||||||
Tick During Game |
Makes the EQSTestingPawn, and its debug visualization, tick during the running game. |
||||||||||||||||||||||
Querying Mode |
Changes what the debug view shows.
|
||||||||||||||||||||||
Nav Agent Properites |
Properties that determine how the Pawn navigates.
|