GetScale
From MaratisWiki
(Difference between revisions)
(Created page with "Get the scale value of the object. Example : object = getObject("object") function onSceneUpdate() SCL = getScale(object) if isKeyPressed("V") then p...") |
Dahnielson (Talk | contribs) m |
||
(4 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
+ | {{lua-function|getScale|object}} | ||
+ | |||
Get the scale value of the object. | Get the scale value of the object. | ||
− | + | {{lua-function-param|object|object to operate on}} | |
object = getObject("object") | object = getObject("object") | ||
Line 10: | Line 12: | ||
if isKeyPressed("N") then print(SCL[3]) end -- Print Z scale value in the console | if isKeyPressed("N") then print(SCL[3]) end -- Print Z scale value in the console | ||
end | end | ||
+ | |||
+ | [[Category:Lua scripting]] | ||
+ | [[Category:Lua function]] | ||
+ | [[Category:Transformation]] |
Latest revision as of 00:18, 9 February 2014
getScale(object)
Get the scale value of the object.
-
object
: object to operate on
object = getObject("object") function onSceneUpdate() SCL = getScale(object) if isKeyPressed("V") then print(SCL[1]) end -- Print X scale value in the console if isKeyPressed("B") then print(SCL[2]) end -- Print Y scale value in the console if isKeyPressed("N") then print(SCL[3]) end -- Print Z scale value in the console end