Fixed 3D preview navigation with tablet
This commit is contained in:
parent
60f587e5e5
commit
71ce5052cd
|
@ -182,7 +182,7 @@ func on_gui_input(event) -> void:
|
|||
if event.pressure != 0.0:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
var motion = event.relative
|
||||
if event.alt:
|
||||
if Input.is_key_pressed(KEY_ALT):
|
||||
zoom(1.0+motion.y*0.01)
|
||||
else:
|
||||
motion *= 0.01
|
||||
|
@ -191,7 +191,7 @@ func on_gui_input(event) -> void:
|
|||
else:
|
||||
motion.y = 0
|
||||
var camera_basis = camera.global_transform.basis
|
||||
var objects_rotation : int = -1 if event.control else 1 if event.shift else 0
|
||||
var objects_rotation : int = -1 if Input.is_key_pressed(KEY_CONTROL) else 1 if Input.is_key_pressed(KEY_SHIFT) else 0
|
||||
if event.button_mask & BUTTON_MASK_LEFT:
|
||||
objects.rotate(camera_basis.x.normalized(), objects_rotation * motion.y)
|
||||
objects.rotate(camera_basis.y.normalized(), objects_rotation * motion.x)
|
||||
|
|
Loading…
Reference in New Issue