Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/examples/input/touch_input_events.rs
6849 views
1
//! Prints out all touch inputs.
2
3
use bevy::{input::touch::*, prelude::*};
4
5
fn main() {
6
App::new()
7
.add_plugins(DefaultPlugins)
8
.add_systems(Update, touch_event_system)
9
.run();
10
}
11
12
fn touch_event_system(mut touch_inputs: MessageReader<TouchInput>) {
13
for touch_input in touch_inputs.read() {
14
info!("{:?}", touch_input);
15
}
16
}
17
18