GetRotation

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "Get the current object rotation in 3d space. objectRot = getRotation(object) Then you can use your object coordinates like this : objectpos[1] : rotation on X axis objectp...")
 
m
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
{{lua-function|getRotation|object}}
 +
 
Get the current object rotation in 3d space.
 
Get the current object rotation in 3d space.
  
objectRot = getRotation(object)
+
{{lua-function-param|object|object to operate on}}
  
Then you can use your object coordinates like this :
+
  objectRot = getRotation(object)
  
objectpos[1] : rotation on X axis
+
Then you can use your object coordinates like this:
  
objectpos[2] : rotation on Y axis
+
* '''objectpos[1]:''' rotation on X axis
 +
* '''objectpos[2]:''' rotation on Y axis
 +
* '''objectpos[3]:''' rotation on Z axis
  
objectpos[3] : rotation on Z axis
+
[[Category:Lua scripting]]
 +
[[Category:Lua function]]
 +
[[Category:Transformation]]

Latest revision as of 01:18, 9 February 2014

getRotation(object)

Get the current object rotation in 3d space.

  • object : object to operate on
  objectRot = getRotation(object)

Then you can use your object coordinates like this:

  • objectpos[1]: rotation on X axis
  • objectpos[2]: rotation on Y axis
  • objectpos[3]: rotation on Z axis
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox