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

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