diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index a1d95f6b46..4ac8d2f761 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -47,6 +47,7 @@ public class MobileInput extends InputHandler implements GestureListener{ //gesture data private Vector2 vector = new Vector2(); + private float lastDistance = -1f; private boolean canPan; /** Set of completed guides. */ private ObjectSet guides = new ObjectSet<>(); @@ -691,8 +692,11 @@ public class MobileInput extends InputHandler implements GestureListener{ @Override public boolean zoom(float initialDistance, float distance){ - float amount = (distance > initialDistance ? 0.1f : -0.1f); + if(lastDistance == -1) lastDistance = initialDistance; + + float amount = (distance > lastDistance ? 0.07f : -0.07f) * Time.delta(); renderer.scaleCamera(io.anuke.arc.scene.ui.layout.Unit.dp.scl(amount)); + lastDistance = distance; return true; }