Sprite:globalToLocal

From GiderosMobile
Revision as of 15:33, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "</source>" to "</syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2011.6
Class: Sprite

Description

Converts the x,y coordinates from the global to the sprite (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) x coordinate relative to the display object
Returns (number) y coordinate relative to the display object