Module input

Source
Expand description

This module provides unsurprising default inputs to bevy_picking through PointerInput. The included systems are responsible for sending mouse and touch inputs to their respective Pointers.

Because this has it’s own plugin, it’s easy to omit it, and provide your own inputs as needed. Because Pointers aren’t coupled to the underlying input hardware, you can easily mock inputs, and allow users full accessibility to map whatever inputs they need to pointer input.

If, for example, you wanted to add support for VR input, all you need to do is spawn a pointer entity with a custom PointerId, and write a system that updates its position. If you want this to work properly with the existing interaction events, you need to be sure that you also write a PointerInput event stream.

Modules§

prelude
The picking input prelude.

Structs§

PointerInputPlugin
Adds mouse and touch inputs for picking pointers to your app. This is a default input plugin, that you can replace with your own plugin as needed.

Functions§

deactivate_touch_pointers
Deactivates unused touch pointers.
mouse_pick_events
Sends mouse pointer events to be processed by the core plugin
spawn_mouse_pointer
Spawns the default mouse pointer.
touch_pick_events
Sends touch pointer events to be consumed by the core plugin