jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.49k stars 742 forks source link

Scaled down sprites do not reliably return true for "Touching" logic even when overlapping (was: Touching<sprite> block is not detecting collisions involving clones) #1383

Open bjr1822 opened 8 years ago

bjr1822 commented 8 years ago

I am trying to use collision detection involving clones in a Space Invader project, the bullets and the aliens are clones. I have logic that should detect player bullet clones colliding with alien clones (so clone touching clone logic) and alien bullets colliding with player (which is clone touching original sprite logic), and neither piece of logic is returning true when testing for collision.

Example repro project is attached

bjr1822_TouchingCloneBugRepro.xml.txt

introlinux commented 8 years ago

If you change in PlayerBullet "Set size to 100%", it works. But it is still rare.

bjr1822 commented 8 years ago

introlinux, are you saying that when size is 100% it sometimes works but not always? Has anyone dug into the root cause on why the algorithm that determines sprite collision is missing this case?

introlinux commented 8 years ago

@bjr1822 , in my browser, when PlayerBullet size is 100% it always works.

bjr1822 commented 8 years ago

Can we agree this is a legit bug? It should work reliably at all scale factors, correct?

-----Original Message----- From: "Antonio Sánchez" notifications@github.com Sent: ‎8/‎24/‎2016 2:08 AM To: "jmoenig/Snap--Build-Your-Own-Blocks" Snap--Build-Your-Own-Blocks@noreply.github.com Cc: "bjr1822" bjr1822@yahoo.com; "Mention" mention@noreply.github.com Subject: Re: [jmoenig/Snap--Build-Your-Own-Blocks] Touching block isnot detecting collisions involving clones (#1383)

@bjr1822 , in my browser, when PlayerBullet size is 100% it always works. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

introlinux commented 8 years ago

Yes.

El 24 ago. 2016 18:24, "bjr1822" notifications@github.com escribió:

Can we agree this is a legit bug? It should work reliably at all scale factors, correct?

-----Original Message----- From: "Antonio Sánchez" notifications@github.com Sent: ‎8/‎24/‎2016 2:08 AM To: "jmoenig/Snap--Build-Your-Own-Blocks" <Snap--Build-Your-Own-Blocks@ noreply.github.com> Cc: "bjr1822" bjr1822@yahoo.com; "Mention" mention@noreply.github.com Subject: Re: [jmoenig/Snap--Build-Your-Own-Blocks] Touching block isnot detecting collisions involving clones (#1383)

@bjr1822 , in my browser, when PlayerBullet size is 100% it always works. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jmoenig/Snap--Build-Your-Own-Blocks/issues/1383#issuecomment-242126030, or mute the thread https://github.com/notifications/unsubscribe-auth/ALhqoE4eD2oAIWuvNz2LgxfUCRbtvmM9ks5qjHBDgaJpZM4Jpl-L .

bjr1822 commented 6 years ago

Pinging this again. The issue in this bug was that the scale of the sprite seems to affect the efficacy of collision detection. I know the title is misleading now that additional investigation has been done. Has the issue of "touching" working poorly with scaled sprites been resolved?