Remove the "min velocity" hack from ParticleClimbingRamp
Previously, we had a problem with this physics simulation not actually hitting the edge of the box and causing the scrollable contents to fall back down. To avoid that problem, we enforced a minimum velocity for the particle to ensure that it always hit the edge of the box. However, when that min velocity kicked in, the results were visually unappealing. This CL fixes the underlying problem. The fix is to apply the impluse from gravity after updating the particle's position. In that way, we slightly over estimate the particle's position in every step of the simulation, ensuring that we don't miss the edge of the box due to errors in our simulation. With this change, we no longer need the min velocity hack. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1008423002
Showing
想要评论请 注册 或 登录