Tnua - A Character Controller for bevy_rapier.
Tnua ("motion" in Hebrew) is a floating character controller, which means that instead of constantly touching the ground the character floats above it, which makes many aspects of the motion control simpler.
Tnua uses Rapier, and supports both the 2D and 3D versions of it:
- Supports both 2D and 3D versions of Rapier
- Running
- Jumping
- Variable height jumping
- Coyote time
- Running up/down slopes/stairs
- Tilt correction
- Moving platforms
- Rotating platforms
- Animation helpers (not the animation itself, but Tnua has facilities that help deciding which animation to play)
- https://idanarye.github.io/bevy-tnua/demos/platformer_2d
- https://idanarye.github.io/bevy-tnua/demos/platformer_3d
bevy | bevy-tnua | bevy_rapier |
---|---|---|
0.10 | 0.1, 0.2 | 0.21 |
The following were used for coding the math and physics of Tnua:
- "Floating capsule" and running mechanics: https://youtu.be/qdskE8PJy6Q
- Jumping mechanics:https://youtu.be/hG9SzQxaCm8
- bevy_mod_wanderlust - the original inspiration for this mod, and where I got the floating capsule video from. I ended up creating my own plugin because bevy_mod_wanderlust does not support 2D.
- Rapier itself has a character controller. It's not a floating character controller, but it's integrated with the physics engine itself and uses that privilege to work out some of the problems the floating model is used to address.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.