Table of Contents

Sprite:globalToLocal

Available since version: Gideros 2011.6

Description:

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

Syntax:

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

Parameters:

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

Return value:

  • number: 1. x coordinate relative to the display object.
  • number: 2. y coordinate relative to the display object.

See Also: