![]() There is a reason to prefix properties in Godot. Why can't they have the same name?īeyond it being a reminder that they aren't the same thing. Ok, they are different, but they do - to a first approximation - the same thing. I should also mention that there are "global" version of these properties, because they are positioned respect to their parent. It is not the case that some nodes got stuck with one name or the other or something like that. For example, you can position a control by anchors and margins, or by placing it in a Container, but then animate the rect_position for effect.Īs you can see, position and rect_position are two different things. And yes, there is also rect_rotation and rect_scale which throw a wrench on the above explanation, but it works as one would imagine.Īnd I say intended because you can mix these. Where rect_position is position from the top left corner of parent. For example, the leftmost part of the control will be positioned at anchor_left * parent_width + margin_left. The abstract is that the anchors are factors, and the margins are offset.
0 Comments
Leave a Reply. |