Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touching color should work when sprites are not visible #212

Closed
paulkaplan opened this issue Dec 8, 2017 · 3 comments · Fixed by #213
Closed

Touching color should work when sprites are not visible #212

paulkaplan opened this issue Dec 8, 2017 · 3 comments · Fixed by #213
Assignees
Milestone

Comments

@paulkaplan
Copy link
Contributor

paulkaplan commented Dec 8, 2017

From @towerofnix


Expected (2.0) Behavior
"Touching color" returns true when the sprite overlaps the given color, regardless of whether or not the sprite is hidden. "Touching sprite" returns true if the sprite overlaps the other sprite, and the sprite is shown; if it is hidden, "touching sprite" returns false.

Actual Behavior
"Touching color" returns false when the sprite is hidden. "Touching sprite" behaves as described in 2.0.

Steps to Reproduce
Demo project: 2.0, 3.0. Move the sprite around using the mouse, and use the space bar to toggle the sprite between being shown and hidden. Observe the contents of the speech bubble while dragging.

(Note - in the speech bubble that shows up, you can see that, next to "touching (sprite)", sometimes "undefined" is being said instead of "false".. undefined is a falsey value, so this is okay, but maybe something to look into if it's not already reported somewhere..)

I don't know what the expected behavior is, but I would think that this incompatibility could be a source of issues in platformer projects?

Demo project 2: 2.0, 3.0. Notice how, in Scratch 3.0, when you hide the sprite, it falls through the floor! 🕳

Operating System and Browser
Firefox Nightly (59) on Debian Testing. I'm fairly certain this same bug was reported here.

@paulkaplan
Copy link
Contributor Author

Eek here are 4 cases I tested.

Hidden Ghost 100
Touching sprite not detected detected
Touching color detected detected

In scratch 2
image

In scratch 3
image

@thisandagain thisandagain added this to the Dec 20 milestone Dec 8, 2017
@paulkaplan paulkaplan self-assigned this Dec 8, 2017
@towerofnix
Copy link
Contributor

Broken demo project links in the original post btw: demo 1 in 2.0, 3.0, demo 2 in 2.0, 3.0.

@paulkaplan
Copy link
Contributor Author

paulkaplan commented Dec 8, 2017

[removed, meant to comment on the PR]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants