ScratchData LogoScratchData
Back to nembence's profile

bitmap costume touch area

NEnembence•Created October 26, 2024
bitmap costume touch area
4
1
74 views
View on Scratch

Instructions

USE TURBO MODE (Shift+Green Flag) Move the mouse pointer around the sprite. The project draws the area where the sprite should touch the mouse. Watch the value of the "touching mouse-pointer" variable. It reflects the value of the <touching mouse-pointer> reporter. Make note of where it is detected. Then, change the costume. Note that bitmaps are detected as if they were bigger.

Description

The project moves the sprite to random positions, checks if the mouse is touched, then goes to where the mouse should be to touch that part of the sprite and puts a dot there. The size is set to 100x using a well-known trick. Vector costumes are detected as they should. Bitmaps are detected bigger than they should: the left edge of the rightmost pixel is detected at the position of it's right edge. This makes a W pixels wide bitmap detected as if it were W*W/(W-1) wide and causes something strange with an 1 pixel wide bitmap (division by 0)

Project Details

Project ID1087360584
CreatedOctober 26, 2024
Last ModifiedDecember 17, 2024
SharedOctober 26, 2024
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root