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:
@@ -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)){
|
if(Core.scene.getKeyboardFocus() == null || !(Core.scene.getKeyboardFocus() instanceof TextField) && !Core.input.keyDown(KeyCode.controlLeft)){
|
||||||
float ax = Core.input.axis(Binding.move_x);
|
float ax = Core.input.axis(Binding.move_x);
|
||||||
float ay = Core.input.axis(Binding.move_y);
|
float ay = Core.input.axis(Binding.move_y);
|
||||||
offsetx -= ax * 15f / zoom;
|
offsetx -= ax * 15 * Time.delta / zoom;
|
||||||
offsety -= ay * 15f / zoom;
|
offsety -= ay * 15 * Time.delta / zoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Core.input.keyTap(KeyCode.shiftLeft)){
|
if(Core.input.keyTap(KeyCode.shiftLeft)){
|
||||||
|
|||||||
Reference in New Issue
Block a user