Hello Guest

Author Topic: Anchor outside of Sprite  (Read 3921 times)

habitoti

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
    • Rombos Homepage
Anchor outside of Sprite
« 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
Checkout our homepage or visit the Rombos blog.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Anchor outside of Sprite
« Reply #1 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);

habitoti

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
    • Rombos Homepage
Re: Anchor outside of Sprite
« Reply #2 on: January 07, 2014, 05:47:06 pm »
Great hint, thx!
Checkout our homepage or visit the Rombos blog.