Trying to get a bunch of ColorRects to cover the Collisionshape2Ds i set up. Creating them does work, but all of them are slightly off from where they should be. I checked their sizes, positions scale, etc. in the Inspector, they're all identical and should line up. Even on Remote View i don't see what could possibly cause this. My hunch was since ColorRects are Control Nodes (and Control nodes are always weird), that there is something wrong with the anchors or the pivot, but i don't see anything off there either... here's the code in any case:
func _ready():
for collision_shape in get_children():
var wall = ColorRect.new()
wall.set_size(collision_shape.get_shape().get_size())
wall.global_position = collision_shape.position
wall.rotation = collision_shape.rotation
wall.scale = collision_shape.scale
get_tree().get_first_node_in_group("WALL").add_child.call_deferred(wall)
print(wall.get_begin())
The ColorRects instantiate on the Control node as they should. I tried instantiating them on the StaticBody (called "Walls" in the Scene Tree) as well, that gives me the same result, every ColorRect is slightly off.