Closed arouinfar closed 4 years ago
@arouinfar I confirmed that the ball is being "bumped" to the left of ball1.
But I don't believe that this is actually a bug due to how restart/states work; at the END of when any ball is manipulated, every balls state is saved, if and only if it is in-bounds. This decision was described in https://github.com/phetsims/collision-lab/issues/90#issuecomment-642326077, where @arouinfar said:
but only saving the state if the balls are in bounds sounds reasonable to me.
So essentially what is happening in this scenario is:
However, if you think the current behavior is incorrect, we could slightly alter this behavior; the states are always grouped as one, so when the user is finished manipulating AND none of the balls are out-of-bounds, ALL of the states of every ball is saved. If any of the balls are out-of-bounds, NONE of the states are saved. If that makes sense.
we could slightly alter this behavior; the states are always grouped as one, so when the user is finished manipulating AND none of the balls are out-of-bounds, ALL of the states of every ball is saved. If any of the balls are out-of-bounds, NONE of the states are saved. If that makes sense.
I would prefer this all-or-nothing approach to saving the state @brandonLi8.
OK. Done in the commit above. Back to @arouinfar.
Looks good in master @brandonLi8.
For https://github.com/phetsims/QA/issues/537 and related to #100.
It's generally rare to completely lose a ball when it is bumped away from its neighbors. However, after an inelastic collision, balls are grouped by a wall. Clicking on a middle ball can cause it to be bumped out of bounds. When trying to recover it with the restart button, the lost ball will return to its previously saved state, but the other balls will remain where they were with the lost ball was clicked.
@brandonLi8 this behavior seems odd to me. Can all balls return to their previously saved states? If not, I'm ok with the partially saved state since it allows the user to easily retrieve the lost ball.
Steps to reproduce: