Is it possible to "stitch" Area2Ds together?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Lethal0428

Hello, is there a way to “stitch” smaller area2Ds together, in order to behave as one large area2D? I’m trying to implement “roof” scenes that the player can build with. These roof scenes are made up of a static body, with an area2D as a child. The roof itself is on another collision layer than the player, but the area2D will detect when the player is under the roof. If it detects a player, it becomes hidden. This part works perfectly. However, I also want every roof scene that makes up the entire roof (basically all roof scenes that are touching the roof scene that the player is under) to become hidden as well. Basically, I need the individual Area2D nodes of the different roof pieces to behave as one large Area2D. Any help is appreciated.

I don’t think “stitching” is possible without re-organizing the scene tree at run time, however my recommendation would be to extend the Area2D out so it can also touch the other roof scenes, and then connect a signal or use another method in order to make them all behave the same.

RedBlueCarrots | 2020-07-15 11:36