group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
TriggerSystem.hpp File Reference

Per-tick trigger-volume overlap detection. More...

Include dependency graph for TriggerSystem.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  systems
 Client-only input sampling system — split into two halves so mouse look can run every iterate() (smooth camera at any FPS) while movement keys run once per physics tick group (server-consistent).

Functions

void systems::runTriggers (Registry &registry, bool isPredictedClient=false)
 Test every trigger-volume entity for overlap with non-trigger entities and emit Enter / Stay / Exit events.

Detailed Description

Per-tick trigger-volume overlap detection.

Run after runCollision (which has moved entities to their final positions for the tick). For every entity with a TriggerVolume + Position + CollisionShape, computes the set of non-trigger entities currently overlapping its AABB, diffs against last tick's set, and emits Enter / Stay / Exit events to physics::events.

Determinism: triggers are iterated in entt view order (ascending entity id by default with stable archetype views), and within each trigger the overlap set is kept sorted by id. No event ordering depends on threading.