EQS Node Reference: Tests (2023)

On this page

  • Common Test Properties

  • Distance

  • Dot

  • Gameplay Tags

  • Overlap

  • Pathfinding

  • Pathfinding Batch

  • Project

  • Trace

Within the Environmental Query System (EQS), aTestcan be performed to determine whichItemproduced from a Generatoris the "best" option, given the Context(or frame of reference). Several Tests are provided with the Engine that covers a good percentage of use cases, such as "can an Item trace (see) another Location" or "is the distance between and Item and its Context within a specified range".You can add multiple Tests to a Generator which can be an effective way to narrow down the results, giving you the best possible option.

If the defaultEngine Tests do not accomplish what you desire, you can create custom Tests through C++ code.

Common Test Properties

Each Test type has some unique properties to it that enables you to define how the Test is performed. However, for all Tests, some common properties are used to define what the purpose of the Test is and what to do with the results. For example, is the Test used for filtering out results, oris it being used to score results and weight them, or a combination of both? You can define theTest Purposeamong other properties from theDetailspanel when selecting the Test in the EQS Editor.

Test Properties

Property

Description

Test Comment

Optional comment or explanation about what the Test is used for. This is useful when the purpose of the Test may not be clear, especially when there are multiple Tests of the same type.

Test Purpose

This defines what additional options are available in the Test and what the test should be used for.

Property

Description

Filter Only

Used to filter possible results. Items that fail the Test will be removed.

Score Only

Used to score possible results. Items returned are given a weight value.

Filter and Score

Used to filter and score results.

Filter Properties

The following options are available whenTest Purposeis set toFilter(or set toFilter and Score):

Filtering is done before scoring to avoid calculating thescore on filtered-out items.

Property

Description

Bool Match

This is the value (true or false)to match to grant a scoring factor. When performing a Test, not matching this value will not change the score. For example, on a TraceTest, true or false did we hit something? Or forPathingdoes a path exist?

Multiple Context Filter Op

Defines the filtering operator when theDistance ToContext returns multiple items.All Passmeans all Contexts must pass whileAny Passstates at least one Context must pass.

Float Value Min

Filter any value less than or equal to this value.

This option is only available forDistanceandDotTests.

Float Value Max

Filter any value greater than or equal to this value.

This option is only available forDistanceandDotTests.

Filter Type

Used to change the type of Filter applied toMinimum,Maximum, or aRangeof values. Any values outside the values specified in theFloat Value Min and/orFloat Value Max properties will be culled out.

This option is only available forDistanceandDotTests.

Score Properties

The following options are available whenTest Purposeis set toScore(or set toFilter and Score).

Property

Description

Multiple Context Filter Op

Defines the filtering operator when theDistance ToContext returns multiple items.All Passmeans all Contexts must pass whileAny Passstates at least one Context must pass.

ClampMin Type

Defines whether aSpecified Valueshould be used to normalize the raw test value before applying the scoring formula, or if thelowestvalue found (Tested) should be used.

This option is only available forDistanceandDotTests.

Clamp Max Type

Defines whetheraSpecified Valueshould be used to normalize the raw test value before applying the scoring formula, or if the highestvalue found (Tested) should be used.

This option is only available forDistanceandDotTests.

Scoring Equation

This modifies the score of the Test to adhere to a curve of theConstant,Linear,Square,Inverse Linear, orSquare Roottype.

This option is only available forDistanceandDotTests.

Scoring Factor

The weight (factor) in which to multiply the normalized score after the scoring equation is applied. This value can be a negative number.

This option is only available forDistanceandDotTests.

Normalization Type

Specifies how to determine the value span used to normalize score.Absolute(use 0 as the base of normalization range) orRelative to Scores(use the lowest Item score as the base of normalization range).

This option is only available forDistanceandDotTests.

Reference Value

Used to normalize Test's results in such a way that the closer a value is to Reference Value the higher normalized result it will produce. The value farthest away fromReference Value will be normalized to 0, and all other values in between will get normalized linearly with the distance toReference Value.

This option is only available forDistanceandDotTests.

Distance

EQS Node Reference: Tests (1)

TheDistanceTest will return the direct distance between the Item and the chosenDistance Toproperty. If Distance To is more than one location, it averages the results of each distance check.

EQS Node Reference: Tests (2)

Property

Description

Test Mode

Themethod used to test Distance: in3D space, in 2D as an XY plane, along theZ or Z (absolute) axis.

Distance To

The Context that will be used to measure the distanceto.

Dot

EQS Node Reference: Tests (3)

TheDotTest calculates the Dot Product of two vectors. These can be Context rotations or vector from one point to another. This Test is useful for determining if something is facing something else.

EQS Node Reference: Tests (4)

The following properties are available for theDotTest:

Property

Description

Line A Mode

This is used to define the direction of the first line used by the Test. There are two methods you use toobtain the direction:

Property

Description

Rotation

The specified Context will be used as a direction.

Two Points

Direction from Location of one Context to another.

Line B Mode

This is used to define the direction of the secondline used by the Test. There are two methods you can use to obtain the direction:

Property

Description

Rotation

The specified Context will be used as a direction.

Two Points

Direction from Location of one Context to another.

Test Mode

Whether the Test should calculate using the complete 3D vector or just the 2D heading vector of theLine AandLine Bvectors.

Absolute Value

This will make the Test return the Absolute Value of the Dot Product (a Dot Product returns a value from -1.0 to 1.0).

EQS Node Reference: Tests (5)

TheGameplay TagsTest enables you to specify a Tag to query and attempt to match in your Test.

EQS Node Reference: Tests (6)

Property

Description

Tag Query to Match

Opens the Gameplay Tags Editor where you can specify the Tags to validate against.

Reject Incompatible Items

Controls how to treat actors that do not implement IGamePlayTgAssetInterface. If true, actors that do not implement the interface will be ignored, meaning they will not be scored and will not be considered when filtering. If false, actors that do not implement the interface will be included in filter and score operations with a zero score.

Overlap

EQS Node Reference: Tests (7)

TheOverlapTest can be used to determine if an Item (or Items) are within the bounds defined in the properties.

EQS Node Reference: Tests (8)

Property

Description

Extent X

Shape parameter for the overlap along the X-axis.

Extent Y

Shape parameter for the overlap along the Y-axis.

Extent Z

Shape parameter for the overlap along the Z-axis.

Shape Offset

Offset from the Item location at which to test the overlap. For example, you may need to offset vertically to avoid overlaps with flat ground.

Overlap Channel

Geometry trace channel used for overlap.

Overlap Shape

The shape used for geometry overlap (Box,Sphere, orCapsule).

Only Blocking Hits

if set, overlap will only look for blocking hits.

Overlap Complex

If set, overlap will only run on complex collisions.

Skip Overlap Querier

If set, overlap will skip querier context hits.

Pathfinding

EQS Node Reference: Tests (9)

ThePathfindingTest can be used to determine if a path exists to (orfrom) the Context, how expensive the path to (or from) the Context is, or how long the path is.

EQS Node Reference: Tests (10)

Property

Description

Test Mode

The method in which to apply the Test:

Property

Description

Path Exist

Does the path exist to (or from) the Context

Path Cost

How expensive is the path to (or from) the Context.

Path Length

How long is the path to (or from) the Context.

Context

This is the Context of the path to or from.

Path from Context

Should the pathfinder go to (false) or from (true) the Context.

Filter Class

The optional navigation filter to use in pathfinding.

Skip Unreachable

If set, Items with failed paths will be invalidated.

WhenTest Modeis set toPath CostorPath Length, theFilterandScoresections of theDetailspanel change to provide the options typically only available to the common properties outlined forDotandDistancetests.

Pathfinding Batch

EQS Node Reference: Tests (11)

ThePathfindingTest can be used to determine if a path exists to (orfrom) the Context, how expensive the path to (or from) the Context is, or how long the path is.Every processed Context (paths) will be scored depending on the definedTest Mode.

EQS Node Reference: Tests (12)

Property

Description

Test Mode

The method in which to apply the Test:

Property

Description

Path Exist

Does the path exist to (or from) the Context.

Path Cost

How expensive is the path to (or from) the Context.

Path Length

How long is the path to (or from) the Context.

Context

This is the Context that the AI should path to or from.

Path from Context

Should the pathfinder go to (false) or from (true) the Context.

Filter Class

The optional navigation filter to use in pathfinding.

Scan Range Multiplier

The multiplier for the max distance between point and Context.

Skip Unreachable

If set, Items with failed paths will be invalidated.

WhenTest Modeis set toPath CostorPath Length, theFilterandScoresections of theDetailspanel change to provide the options typically only available to the common properties outlined forDotandDistancetests.

Project

EQS Node Reference: Tests (13)

The ProjectTest can be used to project theresulting Items onto the NavMesh (and which NavMesh data set to use).

This will move Items that may be inside walls or blocked, back onto the NavMesh, which can create bunching if a grid line happens to be just beyond the edge of the NavMesh.

EQS Node Reference: Tests (14)

Property

Description

Trace Mode

This is the shape used for geometry tracing:

Property

Description

Navigation

Does the path exist to (or from) the Context.

Geometry by Channel

Determines how expensive the path is to (or from) the Context by using channel tracing.

Geometry by Profile

Determines how expensive the path is to (or from) the Context by using profile tracing.

Navigation Filter

The (optional)navigation filterclass to used.

Extent X

Shape parameter for trace.

Project Down

Search height is defined below the specified point.

Project Up

Search Height is defined above the specified point.

Post Projection Vertical Offset

This value will be added to the resulting location's Z-axis.

This can be useful when projecting points onnavigation since the Navmesh is just an approximation of Level geometry and items may end up being under collide-able geometry which would, for example, falsify visibility tests.

Trace

EQS Node Reference: Tests (15)

TheTraceTest will traceto (or from) an Item orContext and return if it hit it or not something. You can invert the result using theFilteroption,Bool Match. One typical use-case for this type of test is to determine if an enemy can (or cannot) see a Player in the Level.

EQS Node Reference: Tests (16)

Property

Description

Trace Mode

This is the shape used for geometry tracing:

Property

Description

Geometry by Channel

Determines how expensive the path is to (or from) the Context by using channel tracing.

Geometry by Profile

Determines how expensive the path is to (or from) the Context by using profile tracing.

Trace Channel

This is the channel to perform the trace against. By default,VisibilityandCameraare the available options however, additional channels can be added in theEdit Menu > Project Settings > Physics > Trace Channelssection of the Project Settings.

Trace Shape

The shape to perform the trace:Line,Sphere,Box,orCapsule.

Trace Complex

Whether the trace should be against the mesh (complex) or just the simple collision.

Only Blocking Hits

Whether the trace uses blocking or non-blocking traces in its results.

Trace from Context

The Context to trace from, such as the Querier, an Item, or any custom Contexts you may have created.

Context

This is the other end of the trace.

Item Height Offset

This will add a Z offset, in cm, to the Item the Test is tracing to (orfrom).

Context Height Offset

This will add a Z offset, in cm, to the Context the test is tracing to (orfrom).

Top Articles
Latest Posts
Article information

Author: Jeremiah Abshire

Last Updated: 17/08/2023

Views: 5973

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Jeremiah Abshire

Birthday: 1993-09-14

Address: Apt. 425 92748 Jannie Centers, Port Nikitaville, VT 82110

Phone: +8096210939894

Job: Lead Healthcare Manager

Hobby: Watching movies, Watching movies, Knapping, LARPing, Coffee roasting, Lacemaking, Gaming

Introduction: My name is Jeremiah Abshire, I am a outstanding, kind, clever, hilarious, curious, hilarious, outstanding person who loves writing and wants to share my knowledge and understanding with you.