Normally, when I create hotspots for navigation, I use 1 Area2D/CollisionShape2D per navigation direction (the green box).
I wondered if I could use only 1 Area2D node with several CollisionShape2D's instead (pink box) ?
My code attached to the Area2D would then be something like below. Am I using 'idx' in the correct way ? Would this be a safe thing to do ?
func _ready():
connect("input_event", self, "on_nav_click")
func on_nav_click(vp:Node, e:InputEvent, shape_idx:int):
# if btn down
if e.is_action_pressed("lmb"):
print("nav click ", get_child(shape_idx).name)
