Some times when my kinematic player jumps on top of a static block, the block drops down one pixel and gets 'stuck' in the floor. This is problematic not just because it looks ugly, but also because its friction with the floor appears to be much higher when it is in its lower position.
How do I prevent it from getting lower than the floor, or how do I release it from the floor as soon as possible? I tried modifying its position and velocity when a collision happens, but I could not fine tune that to get a desirable outcome.
The effect takes place in this gif on the second jump.
