2D Toolkit Forum

2D Toolkit => Support => Topic started by: dustinbahr on October 08, 2012, 06:19:35 pm

Title: Change sprite anchor at runtime?
Post by: dustinbahr on October 08, 2012, 06:19:35 pm
Is it possible to change the anchor point of a sprite at runtime?
Title: Re: Change sprite anchor at runtime?
Post by: unikronsoftware on October 08, 2012, 07:02:12 pm
No you cant, but you can work around this by creating a gameobject as a parent, and making your sprite a child of it.
Title: Re: Change sprite anchor at runtime?
Post by: marceloSpiezzi on November 19, 2012, 10:37:14 pm
Can you explain better how to achieve this ?

I'm trying to do this but when I change the transform position of the object it ignores the position relative to the Anchor Point and moves the object as if it is not parented to the Anchor Point.
Title: Re: Change sprite anchor at runtime?
Post by: unikronsoftware on November 19, 2012, 11:44:02 pm
@marceloSpiezzi - could you post some more details, maybe a pic of the hierarchy? I'm not exactly sure what you mean.