This commit is contained in:
James 2023-12-28 15:58:40 +00:00
parent a9dcb4b850
commit 87542751e4

View File

@ -13,7 +13,7 @@ func _input(event):
last_mouse_position = get_global_mouse_position()
elif event.button_index == MOUSE_BUTTON_RIGHT and not event.pressed:
last_mouse_position = Vector2.ZERO
if event.button_index == MOUSE_BUTTON_WHEEL_DOWN and event.pressed:
elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN and event.pressed:
zoom_towards_mouse(Vector2(0.9, 0.9))
elif event.button_index == MOUSE_BUTTON_WHEEL_UP and event.pressed:
zoom_towards_mouse(Vector2(1.1, 1.1))
@ -31,7 +31,6 @@ func _input(event):
elif event is InputEventMagnifyGesture:
zoom_towards_mouse(Vector2(event.factor,event.factor))
func zoom_towards_mouse(zoom_factor):
var previous_mouse_position := get_local_mouse_position()
zoom *= zoom_factor