Discuss Scratch

nuyouyt2
Scratcher
56 posts

Keychain Physics

Can someone help me with some keychain physics? i have most of it done, but i want the charm to swing mulitple times instead on once. I also want it to swing less sharply.

game

Last edited by nuyouyt2 (Aug. 4, 2026 05:20:38)

-duckergames-
New Scratcher
13 posts

Keychain Physics

calculate restoring force pulling back to 0 degrees


update velocity and apply friction


apply velocity to current angle


if its too stiff and stops too fast: drop stiffness to 0.04, set damping to 0.95.

if it swings endlessly like a pendulum: Drop damping slightly like 0.92

if its too loose or slow to react: raise stiffness slightly like 0.07

try this : D

Powered by DjangoBB