idanarye / bevy-tnua

A floating character controller for Bevy

Home Page:https://crates.io/crates/bevy-tnua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3d example stuck

dt665m opened this issue · comments

if you crouch under one of the platforms and lets it auto hold crouching... you get stuck if you jump. Great work on the library! Looking through it for inspiration but if I find any obvious reason why this happens I'll try to PR. Cheers!

I assume you mean this?

Peek.2023-08-13.15-36.mp4

Happens with the 2D example too, but because the physics configuration there is "softer" you can wriggle your way out of it:

Peek.2023-08-13.15-34.mp4

Yeah, I'm not sure if this is just the example's setup or if there is something going on in the platformer system. It's quite a bit of code. Just mentioning here that I ran into it.

Without TnuaKeepCrouchingBelowObstacles, you'd get a similar behavior when releasing the crouch button while still under the obstacle. So I suspect it's a similar issue.

Another option to investigate is that the character does not go high enough for Tnua to detect that the jump has already started, and it thinks that it's still in the jump takeoff stage.

Note that the fix uses TnuaKeepCrouchingBelowObstacles - you'd still get stuck if you don't use it.