bevy/crates
Johan Klokkhammer Helsing a1e442cd2a
Add gamepad rumble support to bevy_input (#8398)
# Objective

Provide the ability to trigger controller rumbling (force-feedback) with
a cross-platform API.

## Solution

This adds the `GamepadRumbleRequest` event to `bevy_input` and adds a
system in `bevy_gilrs` to read them and rumble controllers accordingly.

It's a relatively primitive API with a `duration` in seconds and
`GamepadRumbleIntensity` with values for the weak and strong gamepad
motors. It's is an almost 1-to-1 mapping to platform APIs. Some
platforms refer to these motors as left and right, and low frequency and
high frequency, but by convention, they're usually the same.

I used #3868 as a starting point, updated to main, removed the low-level
gilrs effect API, and moved the requests to `bevy_input` and exposed the
strong and weak intensities.

I intend this to hopefully be a non-controversial cross-platform
starting point we can build upon to eventually support more fine-grained
control (closer to the gilrs effect API)

---

## Changelog

### Added

- Gamepads can now be rumbled by sending the `GamepadRumbleRequest`
event.

---------

Co-authored-by: Nicola Papale <nico@nicopap.ch>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Nicola Papale <nicopap@users.noreply.github.com>
Co-authored-by: Bruce Reif (Buswolley) <bruce.reif@dynata.com>
2023-04-24 15:28:53 +00:00
..
bevy_a11y Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_animation Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_app Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_asset Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_audio Ability to set a Global Volume (#7706) 2023-04-10 14:08:43 +00:00
bevy_core Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_core_pipeline Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_derive Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_diagnostic Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_dylib Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_dynamic_plugin Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_ecs Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_ecs_compile_fail_tests Fix 1.69 CI clippy lints (#8450) 2023-04-20 16:51:21 +00:00
bevy_encase_derive Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_gilrs Add gamepad rumble support to bevy_input (#8398) 2023-04-24 15:28:53 +00:00
bevy_gizmos Add a bounding box gizmo (#8468) 2023-04-24 15:23:06 +00:00
bevy_gltf Add support for custom glTF vertex attributes. (#5370) 2023-04-24 14:20:13 +00:00
bevy_hierarchy Remove Children component when calling despawn_descendants (#8476) 2023-04-24 14:14:52 +00:00
bevy_input Add gamepad rumble support to bevy_input (#8398) 2023-04-24 15:28:53 +00:00
bevy_internal add a default font (#8445) 2023-04-21 22:30:18 +00:00
bevy_log add a feature for memory tracing with tracy (#8272) 2023-04-17 16:04:46 +00:00
bevy_macro_utils Simplify world schedule methods (#8403) 2023-04-19 19:48:35 +00:00
bevy_math Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_mikktspace Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_pbr Handle vertex_uvs if they are present in default prepass fragment shader (#8330) 2023-04-23 08:07:15 +00:00
bevy_ptr Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_reflect Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_reflect_compile_fail_tests Fix 1.69 CI clippy lints (#8450) 2023-04-20 16:51:21 +00:00
bevy_render Changed (Vec2, Vec2) to Rect in Camera::logical_viewport_rect (#7867) 2023-04-24 15:24:52 +00:00
bevy_scene Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_sprite Add Aabb calculation for Sprite, TextureAtlasSprite and Mesh2d (#7885) 2023-04-24 14:26:08 +00:00
bevy_tasks Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_text Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_time Fix timer with zero duration (#8467) 2023-04-24 14:32:42 +00:00
bevy_transform Add a bounding box gizmo (#8468) 2023-04-24 15:23:06 +00:00
bevy_ui Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_utils Simplify world schedule methods (#8403) 2023-04-19 19:48:35 +00:00
bevy_window Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_winit Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00