7 releases (breaking)

new 0.6.0 Jan 13, 2025
0.5.0 Dec 5, 2024
0.4.0 Nov 30, 2024
0.3.0 Nov 30, 2024
0.1.0 Oct 20, 2024

#130 in #macros

Download history 141/week @ 2024-10-16 21/week @ 2024-10-23 134/week @ 2024-10-30 46/week @ 2024-11-06 7/week @ 2024-11-13 159/week @ 2024-11-20 257/week @ 2024-11-27 183/week @ 2024-12-04 31/week @ 2024-12-11 6/week @ 2024-12-18 5/week @ 2025-01-01 63/week @ 2025-01-08

77 downloads per month
Used in bevy_enhanced_input

MIT/Apache

6KB
52 lines

Bevy Enhanced Input

crates.io docs.rs license codecov

Dynamic and contextual input mappings for Bevy, inspired by Unreal Engine Enhanced Input.

Features

  • Map inputs from various sources (keyboard, gamepad, etc.) to gameplay actions like Jump, Move, or Attack.
  • Assign actions to different contexts like OnFoot or InCar, which are regular components.
  • Activate or deactivate contexts by simply adding or removing components.
  • Control how actions accumulate input from sources and consume it.
  • Layer multiple contexts on a single entity, controlled by priority.
  • Apply modifiers to inputs, such as dead zones, inversion, scaling, etc., or create custom modifiers by implementing a trait.
  • Assign conditions for how and when an action is triggered, like "hold", "tap", "chord", etc. You can also create custom conditions by implementing a trait.
  • React on actions with observers.

Getting Started

Check out the quick start guide for more details.

See also examples in the repo. simple.rs should be a good starting point.

Have any questions? Feel free to ask in the dedicated bevy_enhanced_input channel in Bevy's Discord server.

Bevy compatibility

bevy bevy_enhanced_input
0.15.0 0.4-0.6
0.14.0 0.1-0.3

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.

Dependencies

~0.6–1MB
~23K SLoC