Skip to content

Vector graphics have enlarged collision boxes [Bug] #2860

@SAODTHEKING

Description

@SAODTHEKING

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

changed the title [-]Vector graphics have enlarged collision boxes[/-] [+]Vector graphics have enlarged collision boxes {Bug}[/+] on Aug 17, 2018
changed the title [-]Vector graphics have enlarged collision boxes {Bug}[/-] [+]Vector graphics have enlarged collision boxes [Bug][/+] on Aug 17, 2018
changed the title [-]Vector graphics have enlarged collision boxes [Bug][/-] [+]Vector graphics have enlarged collision boxes [Bug] (Bug)[/+] on Aug 18, 2018
changed the title [-]Vector graphics have enlarged collision boxes [Bug] (Bug)[/-] [+]Vector graphics have enlarged collision boxes [Bug] {Bug}[/+] on Aug 18, 2018
changed the title [-]Vector graphics have enlarged collision boxes [Bug] {Bug}[/-] [+]Vector graphics have enlarged collision boxes [Bug][/+] on Aug 18, 2018
changed the title [-]Vector graphics have enlarged collision boxes [Bug][/-] [+]Vector graphics have enlarged collision boxes [Bug] Bug[/+] on Aug 18, 2018
changed the title [-]Vector graphics have enlarged collision boxes [Bug] Bug[/-] [+]Vector graphics have enlarged collision boxes [Bug][/+] on Aug 18, 2018
added this to the September 2018 milestone on Aug 20, 2018
thisandagain

thisandagain commented on Aug 20, 2018

@thisandagain
Contributor
BryceLTaylor

BryceLTaylor commented on Aug 21, 2018

@BryceLTaylor
Contributor

I've created a repro project for this:
https://llk.github.io/scratch-gui/develop/compatibility-testing.html#239879101
touchingvectors

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

gnarf commented on Aug 23, 2018

@gnarf
Contributor

@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 number
  • pass message
  • fail message
  • done- after you finished your tests

21 remaining items

added this to the Backlog milestone on Dec 20, 2018
BryceLTaylor

BryceLTaylor commented on Jan 24, 2019

@BryceLTaylor
Contributor

A member of the community made a great repro project for this: https://scratch.mit.edu/projects/276669573/

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Participants

    @gnarf@thisandagain@BryceLTaylor@fsih@cwillisf

    Issue actions

      Vector graphics have enlarged collision boxes [Bug] · Issue #2860 · scratchfoundation/scratch-gui