AnchorSprite

About AnchorSprite

Type: Gideros class
License: MIT LIcense
Supported platforms:

       

Categories:
  • Animations
  • Graphics
  • User Interface

AnchorSprite adds anchor support to the built-in Sprite. All position, rotation and scale operations will happen relative to the set anchor point instead of to the origin (0,0). The default anchor point is (0,0) so unless you change it, Sprites will behave normally.

Visit AnchorSprite website

Developed by: Nathan Shafer

Sharing is caring:

Code example:

local s = Sprite.new()
s:setAnchorPoint(.5, .5)
s:setPosition(100, 100)
s:setRotation(45)
s:setScale(2)
				

AnchorSprite video