Pan and zoom gestures on a multitouch screen <htt...
# devlog-together
k
j
zoom is currently changing the perceived origin! (everybody does this the first time they implement this, but it’s not the nicest user experience)
k
Yes! I fixed this later. Will share in a bit.
How does this look? I'm basically holding the centroid of the fingers immobile as I zoom. So the top-left of the viewport is constantly adjusted by centroid/oldzoom - centroid/newzoom. Does this seem like the best approach? (I considered weighting by the finger that is moving more, but convinced myself I get that effect for free since the above adjustment is constantly happening as the fingers move. But perhaps I'm rationalizing.)
j
looks way better! 🙂