mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
6 lines
198 B
GDScript
6 lines
198 B
GDScript
|
|
class_name MouseTool
|
||
|
|
|
||
|
|
static func getPositionByScreen(anchor: Vector2, by: Node):
|
||
|
|
var viewport = by.get_viewport()
|
||
|
|
return viewport.get_mouse_position() - viewport.get_visible_rect().size * anchor
|