Honestly, I'm 99.9% sure your problem is not the basis. Quick explanation of what it is if you're interested as on lunch and have a minute and it's pretty fundamental:
Basis is part of an object's "transform" (along with "origin" which states where the start point of the object is).
When a node has a vector, eg Vector2(3, 4)
, you're saying it's so far on the x and so far on the y. But which way is x and which way is y to this object? Well, you define this with a basis matrix. It's like defining the graph paper your vectors are drawn on.
The standard/simplest way is the "identity": Transform2D.x = Vector2(1, 0)
and Transform2D.y = Vector2(0, 1)
.
So any vector is multiplied by its basis matrix. If it's "identity" (as above), nothing changes - just like multiplying by 1 with a float. This means local space is the same as world space.
If we changed the basis on the x to Transform2D.x = Vector2(2, 0)
then it'll scale it on the x and it'll be twice as wide. Transform2D.y = Vector2(0, -1)
and it's upside down. With a bit more maths we can rotate the object and sheer it. In Godot the transform matrices of children are multiplied. So if you move an object, its children move, if you scale it, it's children scale.
Meh, I thought maybe your object might be sheered, but I doubt it.