I have three instances in my scene. Each of these instances are different sizes and I was trying to programmatically resize the CollisionShape2D for each instance. However, I noticed that all the instances share the same size as the last instance in my scene.
I am using the following code to change the CollisionShape2D in the instance node.
get_node("Area2D/CollisionShape2D").get_shape().set_extents(Vector2(scale * 10.0, 5.0))
But this seems to target all the CollisionShape2Ds in the scene, rather than just the specific instance to which it is attached.
How do I target the specific instance in this case?