Simple Gravity in Scratch

About this lesson

Use a Velocity variable for Simple Gravity.

Step 1
To start, paint a black ground on your backdrop:
Temp1414445048

Step 2
Make a new "Velocity" variable:
Temp1414444834

Step 3
Now, add this code to your cat sprite. Here, we are adjusting the velocity when the cat jumps and lands.
Temp1414445214

Step 4
Awesome! Now add this code to the cat sprite. This code will make the cat move Left and Right.
Temp1414446904

Step 5
That's it! It will work like this:

Step 6
OPTIONAL: We can animate the cat's legs to move when he goes Left or Right.
Temp1414445289

Simple Gravity in Scratch Info

Account

MVCode Clubs

Created By

Matie matie

Access Level

public

For Teachers and Schools

Teach coding to your students with MVCode Teach

MVCode offers an integrated product designed to teach coding to students.

Learn more about MVCode Teach