[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lua language question
- From: "Dan East" <dan@...>
- Date: Tue, 15 Jun 2004 16:57:48 -0400
Hi all. So far so good integrating Lua into my game engine. I'm very
impressed with the results.
I have a language specific question. Take the following C example:
So that is a slightly roundabout way of saying object1.vector =
In Lua I have this:
In my environment that is equivalent to Vector *pVec=&object1.vector. Any
changes made to vec apply to object1.vector. My question is how best
syntactically to set vec's values to that of another vector?
This will not work:
vec just references the same thing as vec2.
Currently I have to do this:
I could of course simply expose a function like set(), allowing something
However I wanted something more in the spirit of the Lua language, which
is something I'm only superficially familiar with so far (I'm more familiar
with the stack-based API side than the actual Lua language :).
Suggestions are certainly appreciated!