change size of area2d to fit with parent node

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By stubbsy345
:warning: Old Version Published before Godot 3 was released.

I have a patch 9 frame with and area2d node down the left hand side of the patch 9 frame. I need this to change size with the patch9frame, but I can’t figure out how to do it as there doesn’t seem to be any way of pinning it to the patch9frame margin, any ideas on how I could go about this?

Thanks

:bust_in_silhouette: Reply From: Dr_TwiSteD

You can use resized signal of your Patch9Frame node to track the changes and resize the collision shape of your Area2D accordingly.

NOTE: Just in case you didn’t know, you should not resize Area2D directly, instead you should change the extends of your CollisionShape2D.