Detecting direction using the camera in Scratch is a very useful tool for controlling our sprite using movement. Now you will learn how it functions and how to use it!

To access the full video please subscribe to FLLCasts.com
- #1582
- 24 Mar 2020
The block for detecting directions in Scratch only returns the direction in which anything directly below the object you are programming is moving.
The block we are referring to is found amongst the commands in the "Video Sensing" section:
If you do not have the "Video Sensing" section, follow this link and you will find instructions on how to find it.
This block is detecting movement right now, not direction. In order for it to detect direction, you need to click on "movement" and select "direction" from the drop-down menu:
On its own, this block is not a command (instruction), which is why it does not have the shape of a block that can be attached to your program. Instead, it can be placed onto another block, in the place of a number.
The video above is an example of how you can place the direction detection block inside of a point to direction block. This way the rotation block will rotate the sprite in the direction chosen by the direction detection block and the camera.
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 3 - Rotating and teleporting your character
Introduction
In the previous lesson we programmed our character to move left and right. The next step is to be able to control it all across the screen!
How do you think this is going to happen? Will it actually work?
Of course it's going to work and now we will see how!
- 5
- 4
- 6
- 3d_rotation 0