-
Hello! I was a previous user of Bevy Mod Wanderlust, but the dev has abandoned it for this crate it seems. It's a bit embarrassing, but I've been trying for a few days now and I just can't get this crate to work. The example code is very hard to read with #[cfg()] all over the place and everything is split into many packages. There is even a example crate used in the example file, and the example crate is also hard to read. Is there some minimal example? Right now I have this:
In the example, there is also a component CharacterMotionConfigForPlatformerExample, but I don't know how to get the example crate and I can't understand what this component does. There is a comment, but I honestly don't understand what it is trying to say:
What happens when I run my game is that the camera just falls and there is no floating and no locking of axes, so it just falls over. Maybe I'm stupid or bad Rust programmer, but I'm not sure why this crate is so complex. With Wanderlust you just add a plugin and a component to you player entity. I hate to say it, but I regret the time I spent doing this in stead of just programming my own character from scratch. I think the point of using a crate in stead of doing it yourself is that you can save time to just get started, but eventually most people will probably have to program their own character controller anyways. Sorry this is very negative, and I respect the work into this crate. Looks like a good controller, I just think it needs simpler examples, maybe without support for xpbd and rapier in the same file, and less stuff to get started. If you can help with a minimal example, I would be grateful, and I will maybe use bevy_fpc in the mean time. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
I get what you are saying. I think maybe I was too focused on having the examples demonstrate everything Tnua has to offer, and by doing that sacrificing the readability. I was warned about it, but I guess I just dismissed the warnings... I'll try making a basic quick-start example that only shows how to do simple walk and jump.
The thing you are missing here is a character control system. The full example is quite big (it does try to demonstrate everything), but at the minimum it needs, every frame, to get the controller.basis(TnuaBuiltinWalk {
desired_velocity: some_vec3_with_the_velocity_you_want_to_go_in,
// desired_forward: you only have to set this if you want Tnua to rotate the character on the Y axis
float_height: the_height_the_character_should_float_at,
..Default::default()
}); |
Beta Was this translation helpful? Give feedback.
I've renamed the "examples" to "demos" (which better describe what they do) and added a smaller example instead that can serve as a proper quickstart: https://github.com/idanarye/bevy-tnua/blob/main/examples/example.rs
@askor - please check it out and tell me if it helps you understand how to use this plugin.