GetScale

(Difference between revisions)
Jump to: navigation, search
(Created page with "Get the scale value of the object. Example : object = getObject("object") function onSceneUpdate() SCL = getScale(object) if isKeyPressed("V") then p...")
 
Line 10: Line 10:
 
         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]]

Revision as of 18:00, 4 February 2014

Get the scale value of the object.

Example :

   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
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox