phetsims / forces-and-motion-basics

"Forces and Motion: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/forces-and-motion-basics
GNU General Public License v3.0
7 stars 10 forks source link

Pusher's hand position doesn't update for new objects' size #183

Closed phet-steele closed 8 years ago

phet-steele commented 8 years ago

Use the tweakers to apply force on an object of your choice (I used the PhET girl). While force is still applied, pause the sim and replace your object with a new one (I used the fridge). Do this by placing the second object on top of the first, then remove the first. Otherwise the applied force and pusher will reset. The pusher will not have re-positioned itself even after resuming the sim. Changing the applied force will fix this issue. shadowcat

Seen on all Win 10 browsers. For phetsims/tasks/issues/562.

Troubleshooting information: Name: ‪Forces and Motion: Basics‬ URL: http://www.colorado.edu/physics/phet/dev/html/forces-and-motion-basics/2.0.0-dev.1/forces-and-motion-basics_en.html Version: 2.0.0-dev.1 2016-03-31 19:14:30 UTC User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 Language: en-US Window: 2560x1315 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: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"7d27130a","branch":"master"},"axon":{"sha":"8774f49c","branch":"master"},"babel":{"sha":"1256d684","branch":"master"},"brand":{"sha":"4091d2e7","branch":"master"},"chipper":{"sha":"4dde25da","branch":"master"},"dot":{"sha":"da78031b","branch":"master"},"forces-and-motion-basics":{"sha":"9e3bcda6","branch":"master"},"joist":{"sha":"150c8138","branch":"master"},"kite":{"sha":"24ad131a","branch":"master"},"phet-core":{"sha":"c48bf320","branch":"master"},"phetcommon":{"sha":"d7eed2d1","branch":"master"},"scenery":{"sha":"ee35a4eb","branch":"master"},"scenery-phet":{"sha":"54df833b","branch":"master"},"sherpa":{"sha":"fc4c2c96","branch":"master"},"sun":{"sha":"77f84663","branch":"master"},"tandem":{"sha":"2441eec6","branch":"master"},"vibe":{"sha":"c84b3c41","branch":"master"}}

phet-steele commented 8 years ago

This actually doesn't need to involve pausing at all.

jessegreenberg commented 8 years ago

This is an issue for the deployed version. Whenever the item stack changes we should update the pusher's applied force position.

jessegreenberg commented 8 years ago

Should be fixed in the commit above, to be verified.

phet-steele commented 8 years ago

@jessegreenberg all good except for how the PhET girl is handled.

  1. Place her at the bottom of the stack (with nothing else above her at first) and apply minimal force.
  2. Place a second object above her.
  3. Grab the second object again and you'll see the pusher move slightly; release the object back into the stack and the pusher will move again. Repeat as desired to see him move back and forth.
  4. A third object places the pusher correctly and prevents the back and forth movement.

famb06

Again, I've only seen it happen with the girl at the bottom. Seen on iPads and Win 10 browsers.

jessegreenberg commented 8 years ago

I am curious why this is not an issue for the man. My guess is that it is because the girl tilts her head back slightly when in the 'holding' position, slightly increasing the width of the node. But the pusher's hands only care about the width of the 'normal sitting' position.

jessegreenberg commented 8 years ago

When you click on the item the girl is holding for the first time, she slides a little bit to the left.

jessegreenberg commented 8 years ago

I am noticing that item.armsUp() is always returning true, even if the the PhET Girl and Man don't need to raise the roof.

jessegreenberg commented 8 years ago

It looks like we are trying to set the image to 'sitting' when it should stay 'holding' and the shift is noticeable because the 'sitting' and 'holding' images have different widths.

jessegreenberg commented 8 years ago

Above commit handles https://github.com/phetsims/forces-and-motion-basics/issues/183#issuecomment-212522814, but there is still an issue where the sitting girl slides to the left the first time an item is removed from her hands.

jessegreenberg commented 8 years ago

This is fixed, to be verified in RC testing.

phet-steele commented 8 years ago

I do believe it is fixed.