phetsims / density

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

Bug: Density of 1 kg/L block pops off the bottom #17

Closed kathy-phet closed 4 years ago

kathy-phet commented 4 years ago

The physics of the 1 kg/L block is not quite right. It should sit whereever you put it in the water, but right now, if you try to place it on or near the bottom of the pool, it repels the bottom when you let go and settles a little bit above the bottom. I'm not understanding what physics is leading to this behavior, but it should just sit on the bottom if it is placed there. If there is some upward force from the poll bottom, please set that to zero upon release so that the block stays put and does not experience acceleration.

jonathanolson commented 4 years ago

I'm exploring solutions to this, essentially the physics engine allows a bit of "slop" where things can overlap slightly (so the block is being pushed INTO the ground, and when released experiences a repulsion force).

DianaTavares commented 4 years ago

The behavior of the block and the walls of the pool is the same that the other blocks use to have with the "transparent walls" that restrict the block in the play area (issue #12):

if the user moves fast the block against the invisible wall, it jumps a lot. Can the collision between the wall and the block be inelastic? jumpingBlock

You can see also the rebound of the blocks in all the walls of the pool with all the blocks, but with the block that has 1 kg/L density this behavior looks like "repulsion". density

@jonathanolson, can the collision between the blocks and the walls of the pool be inelastic? Let's see if that fix the problem

jonathanolson commented 4 years ago

I believe I've finally figured out a good way to handle things like this, the behavior is looking much better to me in master. Can you verify?

DianaTavares commented 4 years ago

It looks perfect to me!