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.2 |
Features
This library has three main components:
Kcc
The Kcc component provides the basic functionality for a kinematic character controller:
- applying gravity
- handling slopes
- handling moving platforms
- 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
- running
- jumping
- floating
- 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
- run
- jump
- float
- 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.