1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Fix guides not working properly when the UI is scaled

This commit is contained in:
Manolis Papadeas 2021-09-27 01:30:53 +03:00
parent a3e11701b2
commit 3b7ac1eddf

View file

@ -16,7 +16,10 @@ func _ready() -> void:
func _input(_event : InputEvent):
mouse_pos = get_local_mouse_position()
var tmp_transform = get_canvas_transform().affine_inverse()
var tmp_position = Global.main_viewport.get_local_mouse_position()
mouse_pos = tmp_transform.basis_xform(tmp_position) + tmp_transform.origin
if points.size() < 2:
return
var point0 := points[0]