ScratchData LogoScratchData
Back to kriblo_test's profile

Example: Simple Bouncing Math

KRkriblo_test•Created December 12, 2022
Example: Simple Bouncing Math
31
24
177 views
View on Scratch

Instructions

Use the slider to set the inbound direction, and move the mouse around to set the angle of collision with the circle. See comments inside. The basic math for bouncing used in this example is: outbound_direction = ( ( normal_direction * 2 ) - inbound_direction ) + 180 All code by me (@kriblo). For an example of this math used in a Pen project, see the Bounce custom block, in the Pong sprite, in this simple Pong project: https://scratch.mit.edu/projects/776715105/ Also check out Example: Bounce ball in circle: https://scratch.mit.edu/projects/743653557/

Project Details

Project ID775853322
CreatedDecember 12, 2022
Last ModifiedDecember 15, 2022
SharedDecember 15, 2022
Visibilityvisible
CommentsAllowed