Please expand this article or section. You can help by adding more information if you are an editor. More information might be found in a section of the talk page. (February 2022) |
- This article is about the feature. For the extension, see Video Sensing Extension.
Video Sensing is a feature added in Scratch 2.0, and can be found under 'Extensions.' It sets the backdrop of a project to a live feed of the user's camera. There are 2 stack blocks, 1 hat block and 1 reporter block.
Video Blocks
There are four blocks related to video sensing. Two are stack blocks, one a reporter block, and one is a hat block.
When Video Motion > ()
- Main article: When Video Motion is greater than () (block)
when video motion > (10)
—
This hat block starts its script if video motion is larger than the specified value.
Turn Video ()
- Main article: Turn Video () (block)
turn video (on v)
—
This block can turn the video on, off, or on-flipped (flipped horizontally).
Set Video Transparency to ()
- Main article: Set Video Transparency to () (block)
set video transparency to (50)
—
This block can set the transparency of the webcam output. Setting it to 100 makes it completely white, and 0 is a normal camera, thus any value in-between will set it to the corresponding transparency value.
Video () on ()
- Main article: Video () on () (block)
(video (motion v) on (this sprite v))
—
This reporter block can be accessed and used by any sprite, or the Stage. The first dropdown menu has options "motion" and "direction". The second contains a list of all the sprites.
Cloud Variables
For privacy and security reasons, the video sensing blocks disable cloud variables. A message appears before the green flag is clicked explaining this.