1 unstable release
new 0.1.0 | Mar 4, 2025 |
---|
#439 in Game dev
99 downloads per month
43KB
532 lines
Ichun (行ちゅん)
bevy-ichun (Okinawan dialect for the Japanese word 行く, meaning 'to go') is a simple kinematic character controller for Bevy with Avian3D.
Versions
Bevy | Avian | Ichun |
---|---|---|
0.15 | 0.2 | 0.1 |
Features
This library has three main components:
Kcc
The Kcc
component provides the basic functionality for a kinematic character controller:
- applying gravity
- handling slopes
- collision handling with static geometry
Kcc movement (enabled by default kcc_movement
)
The KccMovementConfig
component provides events which can be used to move the Kcc
around:
- moving
- jumping
- rotating
Kcc input (enabled by default kcc_input
)
This component handles user defined input and uses the kcc_movement
to move the Kcc
around.
- forward, backward, left and right
- jump
- optional key to activate roation
- disable input handling for each
Kcc
& globally
Defining a key to handle roation is not yet implemented (the mouse is used).
This feature is depending on the kcc_movement
.
Examples
Examples are in the examples folder.
It can be run with following command: cargo r --example simple-kcc
Reference material
- The Avian3d example for the kcc: https://github.com/Jondolf/avian/tree/main/crates/avian3d/examples/kinematic_character_3d
License
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.
Dependencies
~22–34MB
~554K SLoC