Spielerando

Make a hanging lantern or sign swing believably, also after a very hard hit

A simple wobble looks right for a gentle nudge and wrong for a big swing, where a real hanging thing slows at the top and takes longer per swing. Here is how to get both right, and keep the swing identical on fast and slow machines.

Why this works

A hanging thing is pulled back by gravity, and the pull is weaker at wide angles than a simple wobble assumes. So big swings take longer. Advancing in small equal time slices makes the result identical on every machine.

When not to use it

Skip it for small decorations or far-off background items where nobody will see the difference. A plain wobble that fades out is enough, cheaper to run, and easier to tune than a true swing.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 28 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Make a hanging lantern or sign swing believably, also after a very hard hit" (read_entry hanging-lantern-swings-slower-when-hit-harder) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP