Seems related to the possibility (rare) that the PC can detach from the horde at the exact moment when the horde reach a screen boder and go down for ONE frame. At this exact moment, the PC horizontal speed is ZERO, and that's this speed that is usd to compute the speed of the flying PC...
Possible solution : do not detach PC during the "down" movement, or compute flying speed from another data.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Seems related to the possibility (rare) that the PC can detach from the horde at the exact moment when the horde reach a screen boder and go down for ONE frame. At this exact moment, the PC horizontal speed is ZERO, and that's this speed that is usd to compute the speed of the flying PC...
Possible solution : do not detach PC during the "down" movement, or compute flying speed from another data.