Scenario: I have 3D boards that are round and divided into rings and columns. Think of a dartboard laid flat - similar in segmentation but my boards are larger and have far more segments. The player will be viewing the boards from an isometric perspective. Characters will occupy the cells on these boards. I already have an input_event signal attached to select the clicked character. I also want to allow players to be able to click the cell that a character occupies and/or click another cell to indicate moving a character to that cell. Think something akin to how most 3D chess games work. You can click on the pawn or the square that the pawn is in and then click on another square to move that pawn to.
As I build the boards and populate the game, I also map the board cells. So I know the Vector3 positions of all four corners of each cell. I'd like to create invisible click areas that are distinct to the cell they are attached to, but I can't necessarily go into my scenes in the 3D editor and manually attach these without it taking a long, long time. There is also the likelihood that the boards may change as the game progresses or as new maps / levels are added. My question is a 2 parts.
- What would be the recommended approach to creating these clickable objects on the fly through GDScript?
- How would I constrain the boundaries of each clickable tile to the four corners for the cell?