How to reduce the speed gradually?

no reply for this?? 🙁
I can't really tell you how your game should check for a back flip condition, but it seems strange to round the angles and angular velocity... why not just check without rounding them.
Let's say the bike starts at angle zero. Seems to me that if it turns more than 180 degrees then it could be considered to have flipped. Or, how about checking the difference in angles between when it jumps and when it touches down. For example if the angle when it lifts off the ground is 22.54 degrees, you would take the closest multiple of 360 which is zero, and this is the starting angle. Then, when it touches the ground again and the angle is for example 734.78 degrees - once again take the closest multiple of 360 which is now 720, divide by 360 to find out how many flips were done.

Original thread: https://box2d.org/forum/viewtopic.php?t=8404