idanarye / bevy-tnua

A floating character controller for Bevy
https://crates.io/crates/bevy-tnua
Apache License 2.0
214 stars 14 forks source link

The correct way to check if a character is grounded #4

Open maxwellodri opened 1 year ago

maxwellodri commented 1 year ago

I've been checking whether the jump_velocity in the TnuaPlatformerAnimatingOutput is Some but not 100% sure if this correct.

idanarye commented 1 year ago

Yes - this is correct. At least to the point that if it doesn't hold for a certain case you can open a bug for it.

diego411 commented 7 months ago

@idanarye Would the new way to do this be to check whether get_count_mut of TnuaSimpleAirActionsCounter is Some?

idanarye commented 7 months ago

@diego411 No. The new way is to use controller.is_airborne. The air actions counter will probably give you the same information, but:

diego411 commented 7 months ago

@idanarye Thank you! Idk how i missed that