Rotate

From MaratisWiki
Revision as of 01:33, 11 April 2012 by Vegas (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Rotates the object. The first 3 zeros are X,Y,Z values and the last is the angle.

To increase rotating speed, put higher value at angle.

Example 1 : Continuous rotation

   object = getObject("object") 
   -- Scene update
   function onSceneUpdate()
       rotate(object, {0, 0, 1}, 1, "local")
   end

Example 2 : Rotation on key press (Space)

   object = getObject("object") 
   -- Scene update
   function onSceneUpdate()
       if isKeyPressed("SPACE") then rotate(object, {0, 0, 1}, 1, "local") end
   end
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox