This site requires JavaScript, please enable it in your browser!
Greenfoot back
sjstiglet
sjstiglet wrote ...

2016/10/4

bounce off walls

sjstiglet sjstiglet

2016/10/4

#
I cannot figure out how to make the ball bounce off of the walls. Can anyone help me? I know I need to compare getX() and 0 to see if the ball hits the left edge, and compare getX() and 700-1 to see if it hits the right edge of the screen. Nothing I try works.
davmac davmac

2016/10/4

#
sjstiglet wrote...
Nothing I try works.
If you post what you think is your best attempt, we can help you figure out what is wrong with it.
You need to login to post a reply.