From 3cf45f4e07c362fe69233431ace87c5ae782bd3e Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 15 Oct 2019 12:10:14 -0400 Subject: [PATCH] Fix video sensing by calling updateMatrix manually before using isTouching --- src/extensions/scratch3_video_sensing/library.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/extensions/scratch3_video_sensing/library.js b/src/extensions/scratch3_video_sensing/library.js index 04abc20e..0f3c24f7 100644 --- a/src/extensions/scratch3_video_sensing/library.js +++ b/src/extensions/scratch3_video_sensing/library.js @@ -289,6 +289,11 @@ class VideoMotion { _curr: curr } = this; + // The public APIs for Renderer#isTouching manage keeping the matrix and + // silhouette up-to-date, which is needed for drawable#isTouching to work + drawable.updateMatrix(); + if (drawable.skin) drawable.skin.updateSilhouette(); + // Restrict the region the amount and direction are built from to // the area of the current frame overlapped by the given drawable's // bounding box.