Translate
(Difference between revisions)
Vegas (Talk | contribs)
(Created page with "Simply Translate the object in 3d space, the 3 zeros are X,Y,Z values. Example 1 Continuous translation : object = getObject("object") -- Scene update function ...")
Newer edit →
(Created page with "Simply Translate the object in 3d space, the 3 zeros are X,Y,Z values. Example 1 Continuous translation : object = getObject("object") -- Scene update function ...")
Newer edit →
Revision as of 01:36, 11 April 2012
Simply Translate the object in 3d space, the 3 zeros are X,Y,Z values.
Example 1 Continuous translation :
object = getObject("object") -- Scene update function onSceneUpdate() translate(object, {0, 0, 1}, "local") end
Example 2 : Translate on key press (Space)
object = getObject("object") -- Scene update function onSceneUpdate() if isKeyPressed("SPACE") then translate(object, {0, 0, 1}, "local") end end