phetsims / build-a-molecule

"Build a Molecule" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
8 stars 7 forks source link

decrease threshold for connecting atoms #154

Closed arouinfar closed 4 years ago

arouinfar commented 4 years ago

Discovered during #113

The threshold for connecting atoms is currently too large. As a result, it can be a really frustrating experience to cut multiple atoms/pieces off of a molecule. After severing a bond, clicking elsewhere in the molecule will cause the pieces to rejoin.

cut

When severing a bond, the atoms scoot pretty far apart. This distance feels appropriate.

However, the threshold to connect these atoms is (roughly?) the same distance, which causes the reconnection issues in the .gif above. Let's reduce the distance at which the atoms will connect to one another to something more like this:

Screen Shot 2020-01-29 at 4 05 04 PM
Denz1994 commented 4 years ago

The bonding and separation thresholds have been reduced to match what is described above. This will need to be reviewed on master @arouinfar.

arouinfar commented 4 years ago

@Denz1994 I'm not longer running into issues with parts automatically reconnecting, but the threshold still seems a bit off.

Here are a few gifs showing atoms reaching the threshold distances. In all cases the distance seems quite a bit larger than the last screenshot in https://github.com/phetsims/build-a-molecule/issues/154#issue-557176995. Often, moving an atom/molecule close to another will cause a repulsion and the non-grabbed atom will scoot away from the one that was dropped nearby. This happens regardless of whether a fragment was first cut from a larger molecule, or if freshly connecting atoms from the bucket. cut2 threshold

Denz1994 commented 4 years ago

This should have been fixed in master in the latest commit. Can you review @arouinfar?

arouinfar commented 4 years ago

@Denz1994 I'm not longer seeing the scooting behavior demonstrated in https://github.com/phetsims/build-a-molecule/issues/154#issuecomment-580946345. However, the distance of the threshold still seems quite a bit larger than what was requested.

threshold

This is the approximate threshold from the gif above: image

Can you reduce the threshold by about half?

Denz1994 commented 4 years ago

The bonding threshold has been reduced by half. The bonding threshold is essentially the distance from the tolerable distance away from a potential bond position. Reducing this threshold means that users will have to focus on dragging close to the position where the bond is formed (think of the yellow circle's position) and not by just dragging the molecule near the other molecule.

If this is the desired behavior @arouinfar, then Master should have the above changes and should be reviewed. If not, then we should discuss it further.

arouinfar commented 4 years ago

Reducing this threshold means that users will have to focus on dragging close to the position where the bond is formed (think of the yellow circle's position) and not by just dragging the molecule near the other molecule.

I generally think this is desirable behavior -- users should bring atoms close together when trying to create bonds. Previously, it felt like things were getting sucked together too easily.

@Denz1994 it looks like the scooting/repelling shown in https://github.com/phetsims/build-a-molecule/issues/154#issuecomment-580946345 has been reintroduced. I'm not sure why I can't set two molecules near-ish to each other (still well outside of the threshold) without the repulsion.

Denz1994 commented 4 years ago

The atoms now repel when the two atoms bonding locations are diagonally aligned. Bromine and Hydrogen are the most extreme case (see 3rd screen, 7th kit) Can you review this dev version @arouinfar?

arouinfar commented 4 years ago

This is looking so much better @Denz1994! I think we can go ahead and close.