Sprite:setAnchorPosition: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2015.03.22<br/>
'''<translate>Available since</translate>:''' Gideros 2015.03.22<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
=== <translate>Description</translate> ===
=== <translate>Description</translate> ===
<translate>Sets x, y, z anchor position of [[Special:MyLanguage/Sprite|Sprite]] in it's relative coordinates.
<translate>Sets x, y, z anchor position of `Sprite` in it's relative coordinates.


Meaning Sprite with dimensions 100x100 and anchor position of 50x50 would rotate around its center</translate>
Meaning Sprite with dimensions 100x100 and anchor position of 50x50 would rotate around its center</translate>

Revision as of 08:28, 24 August 2018

Available since: Gideros 2015.03.22
Class: Sprite

Description

Sets x, y, z anchor position of `Sprite` in it's 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