Closed aronand closed 3 weeks ago
Looking at cogito_player.gd#487, it seems the obvious fix is to add a and is_on_floor()
check to the sprint input, but I think this negates the momentum gained from jumping during a sprint, so I'm wondering if theres a way to retain the momentum from sprinting while locking the input away whilst the player is in midair?
Thanks for the patience with this one, I just hadn't had time to look into this.
@PeterD23 you're right, though I'd actually put the check a bit later and it seems to do the trick:
I've just pushed the update to this, let me know if you encounter any issues.
Oops, didn't mean to close this.
As this seems to be solved "good enough" now, I'm closing this issue.
Cogito and Godot Engine Version: Godot: 4.2.1 Cogito: 6d9f37e
Description: The current implementation of the player controller allows the player to enter the sprinting state even when not on the ground.
Reproduction steps:
Expected behavior: I'm guessing the intended behavior is that the speed boost from sprinting can only be attained while on the ground.
Screenshots: N/A