Closed techwonder21 closed 6 years ago
Using 3.0 sprites in 2.0 works correctly. https://scratch.mit.edu/projects/208667184/
If the say block fix is extensive, is it possible to just fix it for dinosaur1 and duck sprite initially?
I've also noticed another bug (see the gif). I tested this in Scratch 2.0 and it doesn't occur.
@cwillisf @paulkaplan Any thoughts on the easiest path to tightening up the offset on these? This is causing some trouble for some of the resource developers.
/cc @carljbowman
I think this is the same as issue #1568
@BryceLTaylor yeah same issue.
Did some digging into how Scratch 2 works (src): it uses the bounding box of a thin strip at the top of the sprite, instead of the bounding box of the entire sprite.
I propose we introduce a new method on the drawable & renderer that retrieves this bounding box. We can do that by taking an AABB of only the convex hull points that are in this region.
Then the VM can use this new method (renderer.getBoundsForBubble(drawableID)
, e.g.) instead of using renderer.getBounds()
when positioning the bubbles: https://github.com/LLK/scratch-vm/blob/develop/src/blocks/scratch3_looks.js#L122
@cwillisf seem like a good way to do it? I know filtering the convex hull points isn't a geometrically sound operation, it would be better to either redo the convex hull calculation in the strip or take an intersection with the overall convex hull with the strip, but because the strip is so small, I doubt it could really get into too much trouble...
Thanks for the investigation @paulkaplan. This approach seems reasonable. 👍
Expected Behavior
Say blocks for each sprite should appear closer to one another https://scratch.mit.edu/projects/56987002/#editor
Actual Behavior
Say blocks appear further a part so the conversation between sprites looks weird
Steps to Reproduce
Operating System and Browser
Chrome 64