GetRotation
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) m |
||
| 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) | + | objectRot = getRotation(object) |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | Then you can use your object coordinates like this: | |
| − | objectpos[3] : rotation on Z axis | + | * '''objectpos[1]:''' rotation on X axis |
| + | * '''objectpos[2]:''' rotation on Y axis | ||
| + | * '''objectpos[3]:''' rotation on Z axis | ||
[[Category:Lua scripting]] | [[Category:Lua scripting]] | ||
[[Category:Lua function]] | [[Category:Lua function]] | ||
[[Category:Transformation]] | [[Category:Transformation]] | ||
Revision as of 17:42, 8 February 2014
getRotation(object)
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
- objectpos[2]: rotation on Y axis
- objectpos[3]: rotation on Z axis