Get world position of clicked node with signal callback?
I have the following script in my container node which has two child StaticBody nodes:
How can I get the world position of that clicked node?
func _ready(): for i in get_children(): if i is StaticBody: i.connect("input_event", self, "OnClick", [i]) func OnClick(camera, event, pos, normal, index, node): if event is InputEventMouse: if event is InputEventMouseButton: if event.is_action_pressed("mouse click"): print(node) # I want this node's world position. Is it possible