Spielerando

Change how fast something sways or waves without it jumping

When the wind picks up, grass, water and flags should sway faster. The obvious change, a new speed in the same formula, makes everything jump to a different spot in its swing at that instant, and the longer the game has been running, the bigger the jump. Here is how to speed up smoothly and why.

Why this works

What you see is how far along the swing is, and that is the sum of all the speeds so far, not the current speed times the clock. Change the speed, but keep adding up from where the swing really is, and it never skips.

When not to use it

Skip it when the swing is hidden or the speed never changes, such as a fixed flag in steady wind. And where a sudden speed-up is the effect, like a hit that jolts a creature, let it jump on purpose.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 35 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 "Change how fast something sways or waves without it jumping" (read_entry change-wave-speed-without-the-picture-jumping) 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