Senses & Targeting Fields

Physics-based detection volumes for the targeting system — interaction fields and sensory detection.

Targeting fields are physics-based detection volumes that feed target registrations into the Targeting Handler. The GS_TargetingInteractionFieldComponent provides proximity detection for interact-range targets. Fields use their own collision layers and should be placed on child entities rather than the main unit capsule.

For usage guides and setup examples, see The Basics: GS_Interaction.


GS_TargetingInteractionFieldComponent

A physics trigger volume that detects targets entering and exiting the interaction range. Extends AZ::Component and PhysicsTriggeringVolume. Registers detected entities with the parent Targeting Handler.

API

MethodParametersReturnsDescription
TriggerEnterAZ::EntityId entityboolCalled when an entity enters the field. Registers the entity as an interaction-range target.
TriggerExitAZ::EntityId entityboolCalled when an entity exits the field. Unregisters the entity from the interaction-range list.

Setup

  1. Create a child entity under the unit entity that owns the Targeting Handler.
  2. Add a PhysX collider configured as a trigger shape.
  3. Add the GS_TargetingInteractionFieldComponent.
  4. Set the collider to use a dedicated interaction collision layer — do not share the unit’s physics layer.
  5. Point the field to the parent Targeting Handler entity.

Extension Guide

Custom sensory fields can be created by extending the base field pattern:

  1. Create a component that extends AZ::Component and PhysicsTriggeringVolume.
  2. On trigger enter/exit, call RegisterTarget / UnregisterTarget on the Targeting Handler via GS_TargetingHandlerRequestBus.
  3. Add custom filtering logic (line of sight, tag filtering, team affiliation) in your trigger callbacks.

See Also


Get GS_Interaction

GS_Interaction — Explore this gem on the product page and add it to your project.