From c0554072498219060dc25070518aafe528bdc70d Mon Sep 17 00:00:00 2001 From: buthed010203 Date: Fri, 26 Nov 2021 13:45:27 -0500 Subject: [PATCH] Fix editor camera panning (#6380) VSync being disabled will make the camera move unbearably fast currently as it isnt tied to frame time. --- core/src/mindustry/editor/MapView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/editor/MapView.java b/core/src/mindustry/editor/MapView.java index e1e0512c43..a2502e4b8a 100644 --- a/core/src/mindustry/editor/MapView.java +++ b/core/src/mindustry/editor/MapView.java @@ -181,8 +181,8 @@ public class MapView extends Element implements GestureListener{ if(Core.scene.getKeyboardFocus() == null || !(Core.scene.getKeyboardFocus() instanceof TextField) && !Core.input.keyDown(KeyCode.controlLeft)){ float ax = Core.input.axis(Binding.move_x); float ay = Core.input.axis(Binding.move_y); - offsetx -= ax * 15f / zoom; - offsety -= ay * 15f / zoom; + offsetx -= ax * 15 * Time.delta / zoom; + offsety -= ay * 15 * Time.delta / zoom; } if(Core.input.keyTap(KeyCode.shiftLeft)){