bevy_trauma_shake
Add camera shakes to your 2d Bevy game with three lines of code.
Goals
- Zero configuration required
- Sensible defaults
- Batteries included (default noise)
- Compatible with bevy_pancam
Usage
Add the plugin:
app.add_plugins;
Simply add a component to your camera:
commands.spawn;
Make it shake:
There is also a convenience system param for applying trauma to all Shakes:
And an event, if you prefer that:
And even a command:
Maybe I went a little overboard and I should remove one of those ways, in any case, they can be toggled through the features: system_param, events, commands.
Optional configuration
Optionally add ShakeSettings, if you're not happy with the defaults.
commands.spawn;
Bevy Version Support
The main branch targets the latest bevy release.
| bevy | bevy_trauma_shake |
|---|---|
| 0.17 | 0.6, main |
| 0.16 | 0.5 |
| 0.15 | 0.4 |
| 0.14 | 0.3 |
| 0.13 | 0.2 |
| 0.12 | 0.1 |
License
bevy_trauma_shake is dual-licensed under either
- MIT License (./LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.
Thanks
- https://www.youtube.com/watch?v=tu-Qe66AvtY
bevy_camera_shake: 2D and 3D shakes and more configuration options. I used this a lot for reference, but I wanted a simpler API.
Contributions
PRs welcome!