Douglas Bagnall wrote:
FLOOR = 384 if ypos >= FLOOR and velocity > 0: overstep = ypos - FLOOR ypos = FLOOR - overstep * bounce velocity = -velocity * bounce
I tried using this code and I go back to the situation where the ball continues to bounce when it should have come to rest. I would imagine this is because each time the ball passes below the floor we are giving it a little bit of upwards velocity.