Hi, I’m quite new to godot and I’ve incountered a problem while resizing collision shapes in areas in a 2D scene.
I place my Area_2D scene with script inside in the new scene, but I need different sizes and shapes, so I decide to add the collision shapes while in the new scene.
However, when I duplicate the Area_2D with the collison shape and try to resize it, it resizes the other collision shape as well. This happends even if I try renaming them and everything.
I’ll be greatful if someone know how to solve this issue which is currently slowing down the development process of my game! Thx!
I’m pretty sure this has to do with your script that is attached to the Area2D node. When you duplicate the node, the same script is attached to all of them. What you want to do is remove all of your Area2D scenes from your scene tree.
Then, go to the menu and create a new scene based on the Area2D node and attach the script you made.
Next, Go to your main scene and right click the node that should be the parent of the Area2D and select “instantiate child scene” and selec the Area2D scene you previously created. This adds them as unique instances of the same scene rather then duplicates.
This happens due to the Shape being a resource and resources are being shared between scenes on default. This is to save on memory. If you want to have different shapes on each you can either click on the shape and set local_to_scene to true or create a shape for every shape you want and then load them in