I originally set it up so that the player could enter flight mode at any time during a jump or while falling. However, I ran into a tricky issue: when jumping from one platform to the next, if the jump timing is slightly late and the character falls off the edge, it automatically triggers the flight state. This makes the movement feel very clunky and unnatural. I wasn't sure how to handle it, so I ended up tweaking the parameter that allows flight during a fall. Do you happen to have any good ideas for this?
Viewing post in Want a little cat? jam comments
Yes, for the ledge issue, you might want to look into coyote time. It gives the player a tiny extra window to still perform a normal jump right after walking off a ledge.
That way, if they press jump slightly late, the game can still count it as a jump first instead of immediately switching into flight mode. Flight mode would only activate after that small grace window is over.
(As a bonus, you could also look into input buffering. If used for jumping, it lets the game remember a jump input for a short moment, so the player doesn’t have to press jump at the exact frame they land.
For example, if the player presses jump right before touching the ground, the jump can still trigger once they land instead of being ignored. Combined with coyote time, it can make jumping feel much smoother.)