Explorer’s Lab › Orbit Lounge › Build log
Build log
Why the ball sat on a lowered flipper
Derek's second play-test found the ball resting on the base of the lowered left flipper. The cause was sliding friction wrongly applied to a resting, rolling ball. Friction now only acts in impacts, and three tests guard against it.
What Derek saw
The ball came to rest on the left flipper while it was down, and only moved when the flipper was pressed. On a real table, a ball on a lowered flipper rolls straight off the end.
Cause
Two things combined:
- A modelling error. Every contact, including a ball merely resting on or rolling along a surface, applied sliding (Coulomb) friction. That behaves like static friction, so the ball could hold on any slope gentler than atan(μ). With the flipper rubber’s μ = 0.4, that’s about 22°. The curved base of a flipper starts out flat, so the ball stuck there. A real pinball rolls, and rolling contact loses almost nothing to friction.
- A gap in the tests. The drop-grid test written after the first play-test deliberately ignored the flipper area, so it couldn’t see this.
What was done
- Friction now applies only in impacts (normal speed above 0.12 m/s). Resting and rolling losses come from the existing rolling-resistance term.
- The “roll off a balance point” rule was extended to the ends of the flippers.
- Tests:
- the drop grid now covers the flipper area (718 drops);
- new: a ball dropped anywhere along either lowered flipper must roll off;
- new: cradling on a raised flipper must still work.
- Proved the new tests catch the bug: run against the previous physics, both fail at exactly Derek’s position, (0.150, 0.166), and its mirror on the right flipper.
Side effect
The ball no longer drags down the flipper before a flip, so the cradle-shot test is back to reaching the top of the table (peak 1.03 m).
Verification
- 15/15 physics tests pass.
npm run checkpasses.- Not verified: how it plays by hand after the change; Derek’s next play-test.