Crates.io | bevy_trackpad_haptic |
lib.rs | bevy_trackpad_haptic |
version | 0.1.1 |
source | src |
created_at | 2024-06-02 18:12:34.89814 |
updated_at | 2024-06-02 18:18:14.116777 |
description | A bevy plugin for triggering trackpad haptic feedback on a mac |
homepage | |
repository | https://github.com/jasonjmcghee/bevy_trackpad_haptic |
max_upload_size | |
id | 1259373 |
size | 39,308 |
bevy_trackpad_haptic
A bevy plugin for triggering trackpad haptic feedback on a mac.
I also maintain its core dependency trackpad_feedback
.
Try out the example:
cargo run --example simple
fn main() {
App::new()
.add_plugins((MinimalPlugins, TrackpadHapticPlugin))
.add_systems(Update, important_system)
.run();
}
// Everything important
fn important_system(mut feedback_event_writer: EventWriter<FeedbackEvent>) {
// Something happens like damage to the player!
feedback_event_writer.send(
FeedbackEvent::new(
// length in millis
100,
// minimum delay before additional feedback
0
)
);
}
bevy | bevy_trackpad_haptic |
---|---|
0.13 | 0.1 |