-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Expected Behavior
Like scratch 2.0 vector graphics, two sprites return touch output when they are touching.
Actual Behavior
Scratch 3.0 vector graphics return touch output while there is a noticeable distance between the two sprites
increasing sprite size, increases the collision box effect. just like as if it was squared to the size of the sprite (collision box = sprite size^2) or something like that
Steps to Reproduce
I actually have a project ready, its completely broken in 3.0.
try (Single player) it in 2.0, then view it on 3.0
https://scratch.mit.edu/projects/198901436/
Just make a simple level and a simple sprite
enlarge the level to increase the effect
and put an if touching script to =1 else =0
you will find in 3.0 there is a noticeable distance when it gives touching output
Operating System and Browser
Win10/Chrome
Update
After further investigation, i found that zooming in from the browser, decreases the effects of this issue.
And when i reached 300% zoom, the problem fixed itself but not completely.
At 300% zoom, the problem is present but at 5% of the original issue, which is quite good.
And i also tried different browsers, they also have the same issue.
In conclusion, this issue is related to the browser zoom and the editor (Change size) block, i think there is a misunderstanding between them. Because when i changed every (change size) block to 100%, everything worked and the issue disappeared.
Activity
[-]Vector graphics have enlarged collision boxes[/-][+]Vector graphics have enlarged collision boxes {Bug}[/+][-]Vector graphics have enlarged collision boxes {Bug}[/-][+]Vector graphics have enlarged collision boxes [Bug][/+][-]Vector graphics have enlarged collision boxes [Bug][/-][+]Vector graphics have enlarged collision boxes [Bug] (Bug)[/+][-]Vector graphics have enlarged collision boxes [Bug] (Bug)[/-][+]Vector graphics have enlarged collision boxes [Bug] {Bug}[/+][-]Vector graphics have enlarged collision boxes [Bug] {Bug}[/-][+]Vector graphics have enlarged collision boxes [Bug][/+][-]Vector graphics have enlarged collision boxes [Bug][/-][+]Vector graphics have enlarged collision boxes [Bug] Bug[/+][-]Vector graphics have enlarged collision boxes [Bug] Bug[/-][+]Vector graphics have enlarged collision boxes [Bug][/+]thisandagain commentedon Aug 20, 2018
/cc @cwillisf @mzgoddard @gnarf
BryceLTaylor commentedon Aug 21, 2018
I've created a repro project for this:
https://llk.github.io/scratch-gui/develop/compatibility-testing.html#239879101
Here's the project that got me started on this. There is a bouncing tire a few screens in that doesn't bounce high enough due to collisions in 3.0
https://llk.github.io/scratch-gui/develop/compatibility-testing.html#199146476
It does seem to make a difference if you are in bitmap or vector.
gnarf commentedon Aug 23, 2018
@BryceLTaylor Do you think you could rewrite those test cases as sb3 / sb2 integration tests in https://github.com/LLK/scratch-render/tree/develop/test/integration/scratch-tests ?
You can see a bunch of examples of
isTouching
tests there. Adding a new one is just a matter of getting your touching scenarios to "say" things after greenflag (order kind of matters, check my other cases for some utility blocks)plan #
- number of "pass" or "fail" to expect, error if not given the right numberpass message
fail message
done
- after you finished your tests21 remaining items
BryceLTaylor commentedon Jan 24, 2019
A member of the community made a great repro project for this: https://scratch.mit.edu/projects/276669573/