How to get pan, zoom and rotation velocity with cu...
# compose
k
How to get pan, zoom and rotation velocity with custom
detectTransformGestures
? I tried to use
Copy code
val zoomVelocityTracker = VelocityTracker()
zoomVelocityTracker.addPosition(elapsedTimeMillis, Offset(totalZoom, 0f))
but got wrong velocity which is very small
s
I'm also very interested in this 👀
k
Still unresolved, when there are only three sample points, velocity tracker will return zero panChange: Offset(47.5, 17.3), zoomChange: 1.0, rotationChange: 0.0 panChange: Offset(230.1, 97.9), zoomChange: 1.0, rotationChange: 0.0 panChange: Offset(0.0, 0.0), zoomChange: 1.0, rotationChange: 0.0 velocity: pan: 0.0, 0.0, zoom: 0.0, rotation: 0.0