Godot Version
4.2.2
Question
I’m trying to better understand 2d visibility and I’d like some direction for an idea I’d like to execute.
Essentially, I have characters that are being connected to each other, and they make a pentagon or square or any other 2d shape. When they do, I’d like to instantiate an object at the center of them, which is just a 2d representation of the shape they’ve made. I figure I just get the centroid of the shape, then I would spawn the object which would have a repeating pattern, and make the object a square that extends beyond the borders of the characters, and then have a visibility mask with an equal number of points to the shape they made, and the points are tied to the location of each player, so that the pattern is showed within the boundaries, and invisible outside the boundaries.
Sorta just like cutting a cookie out of a sheet of cookie dough.
I’ve been looking into visibility layers and viewports, and from what I’ve seen that is mainly for making entire sprites visible or not depending on the viewport. The other option that I saw was talking about using shaders and a custom shader material. Would the shaders be the right concept to look into for this?