I need to be able to detect if two sprites overlap. I don't think this needs any complicated physics colliders, I figured I'd be able to just use the Rect2D intersect function. The problem is, one of the sprites is in the scene via the editor, but the other sprite is added procedurally. Both are added under the same node, but the sprite that is added procedurally doesn't seem to have it's item_rect translated when the node is translated. Also, do the rects only work in local space, or will the intersection happen in viewport space?
Full Sene: Node with the transparent blue rectangle is one of the nodes of interest, it was placed via the editor.
Second Node Here is the second node of interest. That arm is added procedurally, and the parent node (of both) is where that blue rectangle is.
The transparent blue rectangle is the getitemrect drawn, and the solid blue is the
get_item_rect of the scripted node. As you can see, the transparent rectangle is translated and rotated the same way as the node. But the solid one just stays where it was created, even if the actual node is translated. Help?