Follow up to "GravityGuyWithBounce". Now GravityGuy's bounce is "dampened". Instead of using -1 to switch his Velocity_Y variable, this program uses a negative number with a magnitude of less than one.
It also shows a logic error (a Bug) in the program; because gravity is applied any time that he isn't touching Black, and the "AlreadyBouncing" variable gets reset only if he isn't touching Red, it's possible for him to "sink" thru the red "floor" if the rebound value (bouncy-ness) is too small.
Try adjusting the value to see this effect.
Next update to GravityGuy will be a re-write to fix this problem and give the user input to control Gravity Guy's motion. He'll also gain the ability to "jump" !
Comments
You need to be logged in to post comments
Add a Comment