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

Collision can push ball out of reflecting border #171

Closed liammulh closed 3 years ago

liammulh commented 4 years ago

Test Device

MacBook Air

Operating System

macOS 10.15.5

Browser

Chrome 85.0.4183.102

Problem Description

For https://github.com/phetsims/QA/issues/537. I've found a way that you can hit a ball that pushes it out of the reflecting border. Maybe related to https://github.com/phetsims/collision-lab/issues/167? See the gif below.

Visuals

issue

Troubleshooting Information Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Collision Lab‬ URL: https://phet-dev.colorado.edu/html/collision-lab/1.1.0-dev.2/phet/collision-lab_en_phet.html Version: 1.1.0-dev.2 2020-08-21 16:28:07 UTC Features missing: applicationcache, applicationcache, touch User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36 Language: en-US Window: 1440x798 Pixel Ratio: 1/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 15 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 80) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
brandonLi8 commented 4 years ago

Doesn't look like it's related to #167. Definitely looks to be related to https://github.com/phetsims/collision-lab/issues/132.

jonathanolson commented 4 years ago

When trying to reproduce this, I'm noticing that balls in the inelastic screen seem to be getting "stuck" at one another:

image

jonathanolson commented 4 years ago

Reproducing with "slip" and the preset:

  DEBUG: new InelasticPresetValue( [
    new BallState( new Vector2( 1.84, 0.84 ), new Vector2( 1, 0.3 ), 0.5 ),
    new BallState( new Vector2( 0.03, -0.16 ), new Vector2( 1.57, 0.73 ), 1.5 )
  ] )
jonathanolson commented 4 years ago

I'll have some incoming bug fixes soon for what I was able to reproduce, there were some regressions that I've fixed up.

jonathanolson commented 4 years ago

After fixing things that prevented me from testing this, I screen-shotted the video and used this case to try to reproduce:

  DEBUG: new InelasticPresetValue( [
    new BallState( new Vector2( 0.82, 0.12 ), new Vector2( 2.82, 1.83 ), 0.5 ),
    new BallState( new Vector2( 1.8, 0.8 ), new Vector2( 0, 0 ), 0.5 )
  ] )

In master now, it behaves as normal, so I believe this should be fixed.

KatieWoe commented 4 years ago

This seems like it still occurs in https://github.com/phetsims/collision-lab/issues/178. @jonathanolson Let me know if you want me to close one of these as a duplicate.

KatieWoe commented 4 years ago

Looking closer, I think they may be different actually.

KatieWoe commented 4 years ago

Have not been able to reproduce this myself in dev.10

KatieWoe commented 3 years ago

Looks fixed both in regards to escaped ball and https://github.com/phetsims/collision-lab/issues/171#issuecomment-699037876. I tried one or two other configurations and it didn't happen there. Will reopen if something similar returns.