This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-12-26 09:42:51

Thalia5890
New Scratcher
Registered: 2011-12-26
Posts: 13

How do you make a ball bounce?

How DO you make a ball bounce????????  sad

Offline

 

#2 2011-12-26 09:55:06

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: How do you make a ball bounce?

pick it up, push it to the ground with force and it should bounce  big_smile

On scratch, maybe try messing around with "when touching border" (a sprite on the edge of the screen) "turn 90 degrees and move so many places" so that it appears to have come off the wall from an angle.


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#3 2011-12-26 09:56:08

funwithscratch
Scratcher
Registered: 2011-12-09
Posts: 9

Re: How do you make a ball bounce?

If you want the ball to bounce off the edges, use the "if on edge, bounce" block.

Another way to do this is to change the direction of the ball:

if (whatever bouncing conditions here - touching sprite, etc)
   set (direction) to 180 - direction

Offline

 

#4 2011-12-26 09:57:40

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: How do you make a ball bounce?

Make it so that when it's touching the colour of the ground, it sets the variable 'Y velocity' to ('Y velocity * -0.8). You can check out this project and look at the scripts as well, if you're stuck  smile


Why

Offline

 

#5 2011-12-26 23:31:12

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: How do you make a ball bounce?

here's a script for it
put it on the ball

when green flag clicked
forever start
repeat until touching (ground sprite) start
change y by -(amount)
repeat end
repeat (amount) start
change y by (amount)
repeat end
forever end


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#6 2011-12-27 00:55:52

Freakish
Scratcher
Registered: 2011-10-25
Posts: 1000+

Re: How do you make a ball bounce?

I think you should check out TheBajeebas' Basketball project. It has a really nice bouncing system and I'm sure he'd let you use it.  big_smile


http://i.imgur.com/y3RBV.jpg

Offline

 

#7 2011-12-27 08:57:41

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: How do you make a ball bounce?

Freakish wrote:

I think you should check out TheBajeebas' Basketball project. It has a really nice bouncing system and I'm sure he'd let you use it.  big_smile

You're a Scratcher! Congrats!  big_smile


Why

Offline

 

Board footer