Hello

I was messing around with the cc console and noticed something: the actor, the vectors, and the managers are of type "Userdata". However, it is possible to index them like a table. For example, MyActor.Pos is of type userdata, but it is valid to index MyActor.Pos as a table (MyActor.Pos.x, MyActor.Pos["x"]). In standard Lua, this is not possible.
How is this done? I'm also programming a game in C++ with Lua scripting

, and I'd like to implement this behaviour, because it lets you bind variables directly without the need for set/get functions.
Thanks in advance!
BTW I got access to the Lua source, so it's okay if I have to modificate it.