Sprite:globalToLocal: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 9: Line 9:
(number), (number) = Sprite:globalToLocal(x,y)
(number), (number) = Sprite:globalToLocal(x,y)
</source>
</source>
'''x''': (number) x coordinate of the global coordinate. ''''''<br/>
=== Parameters ===
'''y''': (number) y coordinate of the global coordinate. ''''''<br/>
'''x''': (number) x coordinate of the global coordinate. <br/>
'''y''': (number) y coordinate of the global coordinate. <br/>
=== Return values ===
'''Returns''' (number) 1. x coordinate relative to the display object.<br/>
'''Returns''' (number) 1. x coordinate relative to the display object.<br/>
'''Returns''' (number) 2. y coordinate relative to the display object.<br/>
'''Returns''' (number) 2. y coordinate relative to the display object.<br/>

Revision as of 09:44, 23 August 2018

Available since: Gideros 2011.6

Description


Converts the x,y coordinates from the global to the sprite's (local) coordinates.


(number), (number) = Sprite:globalToLocal(x,y)

Parameters

x: (number) x coordinate of the global coordinate.
y: (number) y coordinate of the global coordinate.

Return values

Returns (number) 1. x coordinate relative to the display object.
Returns (number) 2. y coordinate relative to the display object.