Sprite:setAnchorPosition

From GiderosMobile
Revision as of 01:00, 22 November 2020 by MoKaLux (talk | contribs) (added a note)

Available since: Gideros 2015.03.22
Class: Sprite

Description

Sets x, y, z anchor position of Sprite in its relative coordinates.

Meaning Sprite with dimensions 100x100 and anchor position of 50x50 would rotate around its center.

Sprite:setAnchorPosition(anchorX,anchorY,anchorZ)

Parameters

anchorX: (number) anchor position in Sprite's internal coordinates
anchorY: (number) anchor position in Sprite's internal coordinates
anchorZ: (number) anchor position in Sprite's internal coordinates optional

Note

setAnchorPoint is available in the Bitmap class: Bitmap:setAnchorPoint