Assignment 8:p5 bouncing ball

This project was somewhat hard for me. I had trouble trying to control when the ball would actually change color as it collided with the edges of the screen. However, i used if ballY is just below the edge of the canvas then it would change the color and vice versa. i couldn’t figure out how to control it well.

Here is the code.

https://editor.p5js.org/Aphill18/sketches/q4JQ35Agw

Leave a comment

Design a site like this with WordPress.com
Get started