![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | WarDev |
Hi All,
I have a custom Node2D scene that is used to end the game if certain conditions are met. I have extended this Node2D scene so that the condition is that a kinematic body is inside an Area2D. I want to execute the same code that I have written inside the Node2D every time, however I do not want the Area2D to be the same size or shape every time. My workaround for this has been to add the Area2D I want as a child to the Instanced Node2D rather than having the Area2D in the base scene itself so that I can fiddle with it. I cannot make the Node2D object into an Area2D object itself because I have other Node2D objects that I want to execute the same code with different conditions, such as a certain object exiting the scene tree. Is there a better solution to modifying the Area2D inside of the instanced scene?
Thanks for any and all help!