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 |