I'm trying to create a map for a strategy game where the main screen is a map splitted in several regions and each region can be clicked to show information concerning this region. The shape of each region is irregular, so I need some way to detect when the user clicks over the "visible" area of the sprite.
I started creating a CollisionPolygon2D from the Sprite with the tool that the editor provides and it works great, but this is tedious when you have to create 200 or more regions.
I have been searching for a way to create these CollisionPolygon2D programatically, but I haven't found anything.
Do you know how can this be done or an alternative way?