Expand description
Engine-owned interaction manager that automates hover, leave, click, and selection lifecycle bookkeeping.
The InteractionManager sits between the host event loop and the engine’s
pick/query APIs. Each frame the host feeds raw pointer events
(update_pointer_move, update_pointer_down, update_pointer_up,
update_pointer_leave) and the manager emits high-level
InteractionEvents via drain_events.
§Design goals
- No host-side hover bookkeeping. Enter/leave transitions are diffed internally so the host never tracks previous targets.
- Click-vs-drag suppression. Pointer-down followed by movement beyond a
configurable pixel threshold is treated as a drag - no
Clickevent is emitted. - Double-click timing. Two
Clickevents within a configurable time window produce aDoubleClick. - Layer filtering. An optional set of interactive layer ids restricts which layers participate in automatic hover/select queries.
- Backend-neutral. Works identically in Bevy and pure WGPU integrations.
Structs§
- Interaction
Config - Tuning knobs for the interaction manager.
- Interaction
Manager - Stateful runtime that interprets raw pointer input and emits high-level
InteractionEvents.