I want to make a node into a group of StaticSprite2D, that is a node with a group of sprites within. How do I know / calculate their total size?
The only way I found for checking size is:
auto nodePosition = child->GetNode()->GetPosition2D(); auto nodeWidth = child->GetSprite()->GetRectangle().Width() * PIXEL_SIZE; auto nodeHeight = child->GetSprite()->GetRectangle().Height() * PIXEL_SIZE;
by getting the resource size.
Or that is not possible, I can only have a 1:1 relationship node<->StaticSprite2D component?
It doesn’t look that way, because in the editor i can create a node and multiple StaticSprite2D within it.
Or I need to have a group node alone with n nodes each one set with a single StaticSprite2D?
And for 3D? I’d be able to use AABB min & max for a compound node total size, and even for 2d, but how?