1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-10-07 05:17:17 +03:00

Fix editor camera panning (#6380)

VSync being disabled will make the camera move unbearably fast currently as it isnt tied to frame time.
This commit is contained in:
buthed010203 2021-11-26 13:45:27 -05:00 committed by GitHub
parent e1685ef46c
commit c055407249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)){