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

#1 2012-02-26 21:05:12

efisher82
Scratcher
Registered: 2009-12-07
Posts: 100+

Making objects "fall"

How do you make an object (a ball, for example) fall or roll down a slope? This has probably already been posted on, I imagine...

It probably would involve the use of

<touching color [#00FF00]?>
...


http://bit.ly/ApaYt4http://ow.ly/8Jemvhttp://fulltwist.net/wp-content/plugins/social-slider/icons/standard/youtube-32.png

Offline

 

#2 2012-02-26 23:13:00

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: Making objects "fall"

Try looking at DarthPickley's project, here, for some excellent slope detection and quite accurate physics.


http://trinary.tk/images/signature_.php

Offline

 

#3 2012-02-27 10:03:51

fuz50
Scratcher
Registered: 2008-09-19
Posts: 100+

Re: Making objects "fall"

^The above project is extremely useful, but I find it rather complicated especially if you're working with a much simpler one. One of the most simple ways to go about a rolling script is here:

(I'm too lazy to work with the Scratch Blocks on the forums, so I'll just post the link to the pictures)  tongue

Script
Stage Start

Hope this helps...  smile

Last edited by fuz50 (2012-02-27 10:05:03)


http://img10.imageshack.us/img10/7404/cooltext529102298.jpg
http://siggen.toontown-click.de/sig1.pnghttp://siggen.toontown-click.de/sig2.png

Offline

 

#4 2012-02-27 11:18:52

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Making objects "fall"

http://scratch.mit.edu/forums/viewtopic.php?id=88259 is a topic where people are working on a gravity/jumping script. Some of those scripts might come in handy.

Offline

 

#5 2012-02-27 17:36:58

efisher82
Scratcher
Registered: 2009-12-07
Posts: 100+

Re: Making objects "fall"

Thanks fuz50, I used a variation of your script (i just had to modify it a little bit to detect left-facing slopes too).


http://bit.ly/ApaYt4http://ow.ly/8Jemvhttp://fulltwist.net/wp-content/plugins/social-slider/icons/standard/youtube-32.png

Offline

 

Board footer