Skip to content

fix: proportional speed scaling for +/- keys in bounce demo#262

Merged
ryanbreen merged 1 commit intomainfrom
fix/bounce-speed-scaling
Mar 12, 2026
Merged

fix: proportional speed scaling for +/- keys in bounce demo#262
ryanbreen merged 1 commit intomainfrom
fix/bounce-speed-scaling

Conversation

@ryanbreen
Copy link
Owner

Summary

  • Replace impel()/dampen() with proportional ~15% velocity scaling on +/- keys
  • Old impel() had a fixed-kick code path that triggered 100x speed jumps when a dampened sphere fell below the speed threshold
  • Click-to-impel behavior unchanged

Test plan

  • Press +/- repeatedly — speed changes smoothly in small increments
  • Dampen to near-zero then press + — no sudden explosion

🤖 Generated with Claude Code

Replace impel()/dampen() calls with proportional 15% velocity scaling.
The old impel() had a fixed-kick path for slow spheres that caused
100x speed jumps when a dampened sphere crossed the speed threshold.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ryanbreen ryanbreen merged commit e3f2942 into main Mar 12, 2026
@ryanbreen ryanbreen deleted the fix/bounce-speed-scaling branch March 12, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant