GetRotatedVector

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "Returns the rotated vector according to the object current matrix : vec = getRotatedVector(object, vec3(x, y, z)) Example : vec = getRotatedVector(object, vec3(1, 0, 0)) ...")
 
m
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
Returns the rotated vector according to the object current matrix :
+
{{lua-function|getRotatedVector|object, vector}}
 +
 
 +
Returns the rotated vector according to the object current matrix.
 +
 
 +
{{lua-function-param|object|object to operate on}}
 +
{{lua-function-param|vector|vector}}
  
 
  vec = getRotatedVector(object, vec3(x, y, z))
 
  vec = getRotatedVector(object, vec3(x, y, z))
  
Example :
+
'''Example:'''
  
 
  vec = getRotatedVector(object, vec3(1, 0, 0)) -- returns the rotated x axis of the object
 
  vec = getRotatedVector(object, vec3(1, 0, 0)) -- returns the rotated x axis of the object
 +
 +
[[Category:Lua scripting]]
 +
[[Category:Lua function]]
 +
[[Category:Transformation]]

Latest revision as of 00:20, 9 February 2014

getRotatedVector(object, vector)

Returns the rotated vector according to the object current matrix.

  • object : object to operate on
  • vector : vector
vec = getRotatedVector(object, vec3(x, y, z))

Example:

vec = getRotatedVector(object, vec3(1, 0, 0)) -- returns the rotated x axis of the object
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox