Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
AnchorSprite - Adds movable anchors to any Sprite — Gideros Forum

AnchorSprite - Adds movable anchors to any Sprite

NiicodemusNiicodemus Member
edited June 2013 in Code snippets
I have discussed and shared this in another thread, but I finally got around to writing up a blog post about how it works, and thought I'd create a new discussion in "Code snippets" so that it could be found easier.

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.

Here is an explanation of how it works: http://blog.lotech.org/2013/06/anchorsprite-setting-anchor-point-on.html

And here is the code: https://github.com/nshafer/AnchorSprite

Hopefully it's useful to someone!

Thanks,
Nathan Shafer

Likes: sslivka

+1 -1 (+1 / -0 )Share on Facebook

Comments

Sign In or Register to comment.