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

#1 2011-03-19 09:08:49

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Keeping Objects Close Together

How can I make it so that an object has to stay near another one. I want to do this because I am making an orbiting thing. i got the orbiting part down but I mant the moon to orbit the earth and the earth to orbit the sun. Thanks!

Offline

 

#2 2011-03-19 09:23:51

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Keeping Objects Close Together

There's the insanely simple method of:
http://i56.tinypic.com/24o3hx0.gif

Or if you need it to rotate around the Earth, this is another method (that doesn't affect your direction):
http://i53.tinypic.com/ra2c83.gif
In the last block, do you see the sin/cos of Dir*100's?  You can change the 100's to change how far away the moon is from the Earth.

Last edited by Kileymeister (2011-03-19 09:24:39)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#3 2011-03-19 12:03:54

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Keeping Objects Close Together

Thanks KileyMeister! If I was part of the scratch team then I would make you a community moderator!

Offline

 

Board footer