Godot Version
4.3.stable
Question
I need to open menu in place of LMB longpress. This is my setup:
There is timer connected to the mouse press, when it fires (and LMB is pressed), I’m getting position of mouse press and trying to open the menu there:
func _on_open_menu(pos: Vector2) -> void:
menu_container.position ????
menu_container.set_visible(!menu_container.is_visible())
menu_container is pointing to the VBoxContainer
The problem is that I do not know how to map global coordinate (that I get from mousepress event, as vector2d) to canvas layer, and open menu on mouse coursor.