Difference between revisions of "Body:getWorldCenter"

m (1 revision: Imported docs from potato.)
Line 1: Line 1:
  
 +
Get the center of mass position in world coordinates.
 +
 +
Use [[Body:getLocalCenter]] to get the center of mass in local coordinates.
  
 
== Function ==
 
== Function ==
Line 14: Line 17:
 
* [[parent::Body]]
 
* [[parent::Body]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=}}
+
{{#set:Description=Get the center of mass position in world coordinates.
 +
}}

Revision as of 16:17, 14 February 2010

Get the center of mass position in world coordinates.

Use Body:getLocalCenter to get the center of mass in local coordinates.

Function

Synopsis

x, y = Body:getWorldCenter( )

Arguments

None.

Returns

number x
The x coordinate of the center of mass.
number y
The y coordinate of the center of mass.

See Also