The Moon orbiting the Earth – how to move one ScratchJr object around another?

In this post, I’ll show you how to prepare an animation of the Moon orbiting around the Earth.

The ScratchJr app provides us with two turn blocks (turn right, turn left) that let us turn an object “in place” (on an axis, around its center of mass). But how can we make one object move around another?

Well, there is a clever trick that makes this “orbiting movement” possible. Let me show you how to do it!

The orbit and a colorful background

The fact that the turn right and turn left blocks allow an object to rotate “around its center of mass” made me want to try out an idea… I wanted to make the Moon orbit the Earth, so the picture of the Moon had to rotate around a fixed axis – in this case, the Earth!

First, open up the ScratchJr app, pull up the character design pad and draw the following object:

ScratchJr character: the Moon with orbit
Create a new ScratchJr character: the Moon with an orbit

Next, place the Earth in the middle of the orbit and make the “orbit-and-Moon” object rotate on an endless loop with a proper script.

Wonder how to hide the orbit, so it doesn’t stand out against the background? It’s simple – all it takes it to adjust the colors so that the circle of the orbit blends with the background!

Edit your backdrop by filling it in with solid color:

ScratchJr solid color background
Fill the background with solid color

Add twinkling stars

To make the animation more eye-catching, you can suggest to your students that they place a few twinkling stars on the dark-blue “night sky”. This activity will help them brush up on how to:

  • Enlarge and shrink an object (on an endless loop);
  • Copy objects with their assigned scripts.

Add a star character to your project and assign it the following script:

Swinkling star ScratchJr script
Twinkling star script

The higher the arguments in the grow and shrink blocks, the more clearly the star will twinkle.

You can then copy the star – there is no need to write the same set of scripts over and over again!
All it takes is to drag the star from the characters area (left side of the screen) to the appropriate page from the list on the right:

Copy ScratchJr character with scripts
To copy the star, drag it from the characters area to the appropriate page on the right.

What else shall we spin around?

You can use this trick in many different animations! You can make the Earth orbit the Sun (or even recreate the entire Solar System!), you can make a car drive around a roundabout, or prepare a birthday card with a flower wreath on it.

What other uses of this design can you think of? Let me know in the comments!


Leave a Reply

Your email address will not be published.