Leave a sparkle trail behind a dragging finger with even spacing
If the sparkles appear once per frame, a slow drag piles them into a blob and a fast flick leaves gaps like a dotted line. The trail should look the same at any speed and on any phone. Here is the way to place them, including what to do when the finger jumps.
Why this works
A trail should look the same whether the finger is fast or slow, and a screen draws at an uneven pace. Counting the distance the finger travelled, and remembering the leftover, makes spacing depend on the path alone.
When not to use it
Don't use it when the trail should show speed itself, like a comet whose tail gets denser the faster it flies. Emit by time there, so the picture tells how fast the finger moved.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 25 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Leave a sparkle trail behind a dragging finger with even spacing" (read_entry sparkle-trail-spaced-by-distance-not-by-frame) 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