-
Notifications
You must be signed in to change notification settings - Fork 350
Closed
Description
Expected Behavior
When the "color () is touching ()" block is used, the ghost effect of the sprite calling it should not affect the result.
Actual Behavior
If the sprite calling "color () is touching ()" has a ghost effect applied, the first argument to "color () is touching()" (the color mask to be applied to the sprite) will be incorrectly darkened, meaning that it will not match properly.
This is a regression introduced by #515.
This has the potential to break the commonly-used "wall sensor" pattern-- I can't find any links right now, but I often come across projects that apply the ghost effect to a "wall sensor".
Steps to Reproduce
- Add a new sprite
- Drag the new sprite over an orange region of the default cat
- Select the default cat
- Drag a "color () is touching ()" block onto the default cat's block workspace
- Set the first argument to the default cat's orange color via the eyedropper
- Set the second argument to one of the overlapping sprite's colors
- Observe that if you click the block, it returns true
- Set the default cat's ghost effect to a nonzero value
- Observe that the block no longer returns true when executed
Or see this repro project.
Operating System and Browser
All
Activity
BryceLTaylor commentedon Mar 24, 2020
Here's a project I made in scratch 2. It has a different behavior in scratch 2 vs. 3.
In scratch 2 a ghosted cat with the "color touching color" block still reports true if the sprite is touching the other color.