phetsims / collision-lab

"Collision Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 4 forks source link

Rewinding doesn't handle initial collision for touching balls #205

Closed jonathanolson closed 3 years ago

jonathanolson commented 3 years ago

Just noticed this, and it's slightly bugging me. Not sure how to handle:

  1. Explore 2d.
  2. Move a ball to touch another so they will immediately collide e.g. image
  3. Play for a short time then pause: image
  4. Rewind fully : image

It shows the velocities before the collision (like they just happened).

This could technically be solved by rewinding an insignificant amount of extra time, potentially? Thoughts?

arouinfar commented 3 years ago

This could technically be solved by rewinding an insignificant amount of extra time, potentially? Thoughts?

Let's try this out @jonathanolson.

jonathanolson commented 3 years ago

Looks like it's working nicely, can you try in master after the above commit?

arouinfar commented 3 years ago

Looks good in master @jonathanolson

DevonQui commented 3 years ago

This has been fixed in rc.2. Closing

KatieWoe commented 3 years ago

It looks like this can happen sometimes, and it seems easier to see if some of the balls have 0 velocity. I reproduced with a set up in Explore 2D, but this is easier to replicate. May be seeing diminishing returns at this point, so I'm assigning @arouinfar to see if it is worth addressing.

https://user-images.githubusercontent.com/41024075/107814628-75ab8e80-6d2f-11eb-9df0-a82f358b8396.MOV

jonathanolson commented 3 years ago

That seems tricky to handle at this stage, I'm likely to break other things (since this definitely wasn't included in the design or original implementation).

arouinfar commented 3 years ago

Thanks @KatieWoe, but given @jonathanolson's assessment, I'm going to close.

KatieWoe commented 3 years ago

This has been closed, but I wanted to document what this looks like in 2D.

https://user-images.githubusercontent.com/41024075/110824908-b7592780-8250-11eb-801e-d7d62ff49e16.MP4