B2.Body:getLocalPoint: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 2: Line 2:
'''Available since:''' Gideros 2012.09.6<br/>
'''Available since:''' Gideros 2012.09.6<br/>
=== Description ===
=== Description ===
<br />
<translate><br />
Returns the local coordinates of a point given the world coordinates.<br />
Returns the local coordinates of a point given the world coordinates.<br />
<br />
<br /></translate>
<source lang="lua">
<source lang="lua">
(number), (number) = b2.Body:getLocalPoint(x,y)
(number), (number) = b2.Body:getLocalPoint(x,y)
</source>
</source>
=== Parameters ===
=== Parameters ===
'''x''': (number) x coordinate of the world point <br/>
'''x''': (number) <translate>x coordinate of the world point</translate> <br/>
'''y''': (number) y coordinate of the world point <br/>
'''y''': (number) <translate>y coordinate of the world point</translate> <br/>
=== Return values ===
=== Return values ===
'''Returns''' (number) x coordinate of the provided point expressed in local coordinates<br/>
'''Returns''' (number) <translate>x coordinate of the provided point expressed in local coordinates</translate><br/>
'''Returns''' (number) y coordinate of the provided point expressed in local coordinates<br/>
'''Returns''' (number) <translate>y coordinate of the provided point expressed in local coordinates</translate><br/>

Revision as of 12:38, 23 August 2018

Available since: Gideros 2012.09.6

Description


Returns the local coordinates of a point given the world coordinates.

(number), (number) = b2.Body:getLocalPoint(x,y)

Parameters

x: (number) x coordinate of the world point
y: (number) y coordinate of the world point

Return values

Returns (number) x coordinate of the provided point expressed in local coordinates
Returns (number) y coordinate of the provided point expressed in local coordinates