Difference between revisions of "Body:getWorldPoint"

m (See Also)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
Transform a point from local coordinates to world coordinates.
  
Transform a point from local coordinates to world coordinates.
 
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
world_x, world_y = Body:getWorldPoint( local_x, local_y )
+
worldX, worldY = Body:getWorldPoint( localX, localY )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|local_x|The x position in local coordinates.}}
+
{{param|number|localX|The x position in local coordinates.}}
{{param|number|local_y|The y position in local coordinates.}}
+
{{param|number|localY|The y position in local coordinates.}}
 
=== Returns ===
 
=== Returns ===
{{param|number|world_x|The x position in world coordinates.}}
+
{{param|number|worldX|The x position in world coordinates.}}
{{param|number|world_y|The y position in world coordinates.}}
+
{{param|number|worldY|The y position in world coordinates.}}
 +
 
 
== See Also ==
 
== See Also ==
 
* [[parent::Body]]
 
* [[parent::Body]]
 +
* [[Body:getWorldPoints]]
 +
* [[Body:getLocalPoint]]
 +
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Transform a point from local coordinates to world coordinates.}}
 
{{#set:Description=Transform a point from local coordinates to world coordinates.}}
 +
{{#set:Since=000}}
 +
 +
== Other Languages ==
 +
{{i18n|Body:getWorldPoint}}

Latest revision as of 04:24, 30 December 2020

Transform a point from local coordinates to world coordinates.

Function

Synopsis

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

Arguments

number localX
The x position in local coordinates.
number localY
The y position in local coordinates.

Returns

number worldX
The x position in world coordinates.
number worldY
The y position in world coordinates.

See Also


Other Languages