One wheel notch zooms a lot on one computer and a touchpad swipe barely moves
Mouse wheels, touchpads and pinch gestures report their movement in very different units, so the same zoom code feels jumpy on one device and dead on another. Here is how to bring them to one scale, why zooming has to multiply instead of add, and where the limits go.
Why this works
Different devices speak in very different amounts, but a zoom step should always mean the same change in size. Turning every input into one common measure and zooming by a ratio, not a fixed amount, makes many small swipes add up to one big notch.
When not to use it
Do not use smooth zooming where the picture should only exist at set sizes, such as pixel art that blurs between sizes, or a map with fixed levels of detail. Snap to whole steps there and ignore the small movements in between.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 2 common mistakes and the fix
- 25 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 "One wheel notch zooms a lot on one computer and a touchpad swipe barely moves" (read_entry strategy-wheel-zoom-mouse-and-trackpad) 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