I don't understand what you want.
There are several ways of transfering a table to another table. It depends on how you define "transfering".
This inserts a member in Cam, called Obj, that points to the contents of the table Bla. But it is the same object; it is not "copied".
Code: Select all
Cam = {}
Bla={x=100, y=100, z=100}
Cam.Obj = Bla
print(Cam.Obj.x) -- prints '100'
Bla.x = 200
print(Cam.Obj.x) -- prints '200'
This makes a copy of Bla, instead of storing a reference to it. So changing Bla doesn't change Cam.Obj:
Code: Select all
Cam = {}
Bla={x=100, y=100, z=100}
Cam.Obj = {}
for k,v in pairs(Bla) do Cam.Obj[k] = v end
print(Cam.Obj.x) -- prints '100'
Bla.x = 200
print(Cam.Obj.x) -- prints '100'
Keep into account that this will work only if Bla is "flat" (contains integers, numbers, strings, etc, but not other tables). If Bla contains other tables, and you want to make a copy of them and not a reference, you will need a more complex function (probably recursive).