GS_Interaction
Categories:
GS_Interaction is the gem that connects entities to each other and to the player. It provides three distinct systems: a physics-based pulse emitter/reactor pair for broadcasting typed events through trigger volumes, a targeting subsystem that tracks and selects interact candidates relative to a cursor, and a world trigger framework that composes trigger conditions with discrete world-state actions. All three systems are designed to be extended — custom pulse types, reactor types, trigger actions, and world trigger behaviors can be registered without modifying the gem.
For usage guides and setup examples, see The Basics: GS_Interaction.
Contents
Pulsors
A physics-based event broadcast system. A PulsorComponent emits a typed pulse event when its physics trigger volume fires. PulseReactorComponents on nearby entities receive the pulse and execute their registered reactor logic. Pulse and reactor types are extensible, so any gem can contribute new pulse/reactor pairs.
| Component | Purpose |
|---|---|
| PulsorComponent | Emits a typed pulse when a physics trigger volume fires. |
| PulseReactorComponent | Receives typed pulses and routes them to registered reactor logic. |
Targeting
A targeting and cursor management system. The Targeting Handler selects the best available interact target from registered candidates detected through proximity trigger volumes. The cursor components manage visual cursor representation on a LyShine canvas. An input reader component bridges raw player input into interaction events.
| Component | Purpose |
|---|---|
| GS_TargetingHandlerComponent | Core targeting logic — selects the closest/best registered interact target. |
| GS_TargetComponent | Base target component with visual properties (size, offset, color, sprite). |
| GS_CursorComponent | Manages the active cursor: registration, visibility, position, and visuals. |
| GS_CursorCanvasComponent | Per-canvas cursor sprite component, registered with GS_CursorComponent. |
| GS_TargetingInteractionFieldComponent | Physics trigger volume used for proximity-based target detection. |
| InteractInputReaderComponent | Maps raw player input to interaction events. |
World Triggers
A composable trigger-action framework for world-state changes. Trigger Sensor components define the condition that fires the trigger (player interact, physics collision, save record state). World Trigger components define the effect (log a message, set a record, toggle entity activation, change stage). Any number of trigger actions can drive any number of world triggers on the same entity.
| Component | Purpose |
|---|---|
| TriggerSensorComponent | Base class for all trigger condition components. |
| InteractTriggerSensorComponent | Fires on interact input. |
| PlayerInteractTriggerSensorComponent | Fires on interact input from the player only. |
| ColliderTriggerSensorComponent | Fires on physics collision with the trigger volume. |
| RecordTriggerSensorComponent | Fires when a save record matches a configured condition. |
| WorldTriggerComponent | Base class for all world trigger effect components. |
| PrintLog_WTComponent | Logs a message when triggered. |
| SetRecord_WorldTriggerComponent | Sets a key-value save record when triggered. |
| ToggleEntityActivate_WorldTriggerComponent | Toggles entity activation state when triggered. |
| ChangeStage_WorldTriggerComponent | Requests a stage/level transition when triggered. |
Installation
GS_Interaction requires GS_Core, LmbrCentral, LyShine, and CommonFeaturesAtom to be active in your project.
- Enable GS_Interaction in Project Manager or
project.json. - Add a GS_TargetingHandlerComponent to the player entity and configure its proximity trigger.
- Add GS_CursorComponent and GS_CursorCanvasComponent to the cursor entity and link them together.
- Place TriggerSensorComponent and WorldTriggerComponent variants on any entity that should react to the world.
- Refer to the Interaction Set Up Guide for a full walkthrough.
See Also
For conceptual overviews and usage guides:
For related resources:
Get GS_Interaction
GS_Interaction — Explore this gem on the product page and add it to your project.