2D Toolkit Forum

2D Toolkit => Support => Topic started by: habitoti on January 07, 2014, 08:51:52 am

Title: Anchor outside of Sprite
Post by: habitoti on January 07, 2014, 08:51:52 am
Hi,

is there any technical reason for a custom anchor being constrained to the sprite boundaries? It would be great if it could be moved also to the outside…

Regards, habitoti
Title: Re: Anchor outside of Sprite
Post by: unikronsoftware on January 07, 2014, 10:37:13 am
No, there isn't really. You can remove the constraints by commenting out
tk2dSpriteCollectionEditorTextureView.cs, line 489 (or so)
Code: [Select]
param.anchorX = Mathf.Clamp(Mathf.Round(anchor.x), 0.0f, texture.width);
param.anchorY = Mathf.Clamp(Mathf.Round(anchor.y), 0.0f, texture.height);
Title: Re: Anchor outside of Sprite
Post by: habitoti on January 07, 2014, 05:47:06 pm
Great hint, thx!