Using sin & cos Demo: Jump! Use the UP Arrow key to initiate a jump. Left and Right Arrow keys to move.
Made from scratch. This demo shows how to use the sin function to create a semi-realistic jump effect where the sprite leaves the ground quickly, slows as it reaches the peak of the jump and accelerates as it falls back to earth where it stops suddenly.