diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js index 0e34204225..a33a629052 100644 --- a/src/blocks/scratch3_motion.js +++ b/src/blocks/scratch3_motion.js @@ -123,6 +123,9 @@ class Scratch3MotionBlocks { if (args.TOWARDS === '_mouse_') { targetX = util.ioQuery('mouse', 'getScratchX'); targetY = util.ioQuery('mouse', 'getScratchY'); + } else if (args.TOWARDS === '_random_') { + util.target.setDirection(Math.round(Math.random() * 360) - 180); + return; } else { const pointTarget = this.runtime.getSpriteTargetByName(args.TOWARDS); if (!pointTarget) return;