With the Video Sensing extension, you can enable a sprite to interact with a camera.
Note: To use the Video Sensing extension, ensure that your PC is equipped with a camera or connected to an external one and that the camera is working properly.
If your camera doesn't work properly, refer to What If My Camera or Microphone Doesn't Work Properly When I Use mBlock 5? to solve the problem.
Add the Video Sensing extension
1. Click the Sprites tab and click + extension at the bottom of the Blocks area.
2. On the Extension center page that appears, click + Add at the bottom of Video Sensing.
After being added, the extension and its blocks are displayed in the Blocks area.
Use the Video Sensing blocks
1. Executes the subsequent script when the video motion is greater than the specified value.
2. Motion/direction value of the video relative to the sprite/stage.
3. Turns the video on, off, or on flipped.
4. Sets the transparency of the video.