I’m trying to understand how the origin {x,y} tables work. Apparently, if we want to change just one variable, either x or y, it’s not possible; it means recreating the entire table.
This isn’t important if it’s for a single element, but if we want to modify hundreds of objects, such as buttons or “points”, it could improve performance.
What I’m trying to do is be able to change just one of the two values without having to rewrite the entire table:
btn.origin = {x = x_, y = y_} --this work
--btn.origin.x = x_ --this not work
--btn.origin.y = y_ --this not work
These codes not work:
btn.origin.x = x_
--btn.origin.y retains the value of the original table
btn.origin.y = y_
--btn.origin.x retains the value of the original table
Could this be implemented to improve performance when moving multiple objects, for example in a large iteration?