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

#1 2012-03-03 01:20:18

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

Accurate bouncing

I have a ball that bounces off a shape (shown below), how do I have it accurately bounce?
It's much larger but I want it to bounce off accurately throughout all the parts.
Help?
__________
\__       __/
   |      |
   |      |
   |      |
   |      |
   |      |
    \     /
     \   /
       -


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

Offline

 

#2 2012-03-03 09:48:59

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Accurate bouncing

First, you have to know the slope of the wall/floor the ball is hitting at the point where it is hitting it.  hmm


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#3 2012-03-03 10:01:54

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: Accurate bouncing

Cool, I want to make a rocket ship.

    __________
    \__       __/
        |     |         
        |     |
        |     |
        |     |
        |     |
         \    /
          \  /
           `

Offline

 

#4 2012-03-03 12:46:19

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

Re: Accurate bouncing

MoreGamesNow wrote:

First, you have to know the slope of the wall/floor the ball is hitting at the point where it is hitting it.  hmm

How?


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

Offline

 

#5 2012-03-03 12:59:27

wjack2010
Scratcher
Registered: 2010-06-28
Posts: 100+

Re: Accurate bouncing

Using x-y co-ordinates, I presume.

Offline

 

#6 2012-03-03 13:09:38

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

Re: Accurate bouncing

Then, how do I determine the angle after knowing the slopes, say for this part

__________
\__       __/
   |      |
   |      |
   |      |
   |      |
   |      |
    \     /
     \   /
       -

Last edited by MaxFlyboy (2012-03-03 13:09:59)


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

Offline

 

#7 2012-03-03 13:13:40

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Accurate bouncing

I honestly don't know how I'd do it.  What I'd first try to do is figure out where you're touching the wall, and then, using a 1-pixel costume, try to approximate the slope.  It would be a lot easier if the sprite was only 1-pixel big to begin with.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

Board footer