One of the first programs we make on Scratch is to make our sprite move forward in a given direction. The problem is that when it reaches the edge of the screen it ceases to move. This block will help us solve this very problem!

To access the full video please subscribe to FLLCasts.com
- #1578
- 22 Mar 2020
The "if on edge, bounce" block does exactly what it says. Every time it is executed, it checks if the sprite is on the edge of the screen and if it is, it prevents it from going on. It also rotates it 180°.
This is very useful if we use movement in steps that is always in a straight direction.
This means that a movement of a few steps in conjunction with "if on edge, bounce" gives us a program in which the sprite moves left and right between the two corners of the screen!
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Keep 'em clean - remote Scratch game course
"Keep 'em clean" is a game that uses the players' real-life movement captured by a camera to control many "people" and push them towards a sink where they wash their hands! In this course, you will learn the basics of programming with Scratch, as well as using the "Video Sensing" extension to receive movement from the camera!
- 41
- 0:00
- 70

Lesson 2 - Control by using the camera
Introduction
Now that we have a character in our game, it's finally time to learn how to move it using our camera.
What do you think the camera detects? Would it be better to move slower of faster? Why?
You will find the answers to these questions by the end of this lesson!
- 6
- 3
- 8
- 3d_rotation 0