#input #bevy #action #context #condition #mapping #contextual

bevy_enhanced_input

Dynamic and contextual input mappings for Bevy

10 releases (6 breaking)

0.7.2 Jan 23, 2025
0.7.1 Jan 20, 2025
0.6.0 Jan 13, 2025
0.5.0 Dec 5, 2024
0.1.0 Oct 20, 2024

#1203 in Game dev

Download history 2/week @ 2024-10-27 163/week @ 2024-11-03 11/week @ 2024-11-10 127/week @ 2024-11-17 120/week @ 2024-11-24 307/week @ 2024-12-01 42/week @ 2024-12-08 15/week @ 2024-12-15 1/week @ 2024-12-29 15/week @ 2025-01-05 142/week @ 2025-01-12 388/week @ 2025-01-19 61/week @ 2025-01-26 67/week @ 2025-02-02 4/week @ 2025-02-09

526 downloads per month

MIT/Apache

185KB
4K SLoC

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.7
0.14.0 0.1-0.3

License

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

Dependencies

~57–98MB
~1.5M SLoC