Difference between revisions of "Body:getWorldVector"

m (included link to other languages)
m
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
world_x, world_y = Body:getWorldVector( local_x, local_y )
+
worldX, worldY = Body:getWorldVector( localX, localY )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|local_x|The vector x component in local coordinates.}}
+
{{param|number|localX|The vector x component in local coordinates.}}
{{param|number|local_y|The vector y component in local coordinates.}}
+
{{param|number|localY|The vector y component in local coordinates.}}
 
=== Returns ===
 
=== Returns ===
{{param|number|world_x|The vector x component in world coordinates.}}
+
{{param|number|worldX|The vector x component in world coordinates.}}
{{param|number|world_y|The vector y component in world coordinates.}}
+
{{param|number|worldY|The vector y component in world coordinates.}}
  
 
== See Also ==
 
== See Also ==
Line 17: Line 17:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Transform a vector from local coordinates to world coordinates.}}
 
{{#set:Description=Transform a vector from local coordinates to world coordinates.}}
 +
{{#set:Since=000}}
  
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|Body:getWorldVector}}
 
{{i18n|Body:getWorldVector}}

Latest revision as of 10:13, 26 January 2016

Transform a vector from local coordinates to world coordinates.

Function

Synopsis

worldX, worldY = Body:getWorldVector( localX, localY )

Arguments

number localX
The vector x component in local coordinates.
number localY
The vector y component in local coordinates.

Returns

number worldX
The vector x component in world coordinates.
number worldY
The vector y component in world coordinates.

See Also


Other Languages