Author Topic: TweenHeight changing anchor left and right  (Read 1958 times)

capitalj

  • Jr. Member
  • **
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 88
    • View Profile
TweenHeight changing anchor left and right
« on: April 30, 2014, 12:00:17 AM »
Hi, I am trying to do a TweenHeight animation on a sprite that is anchored to it's Panel using Unified anchor. The left and right anchors are +0 but when the tween happens (which should only affect the height of the sprite?) both the left and right anchor values start changing as if they are trying to maintain the aspect ratio of the sprite (but I have aspect set to Free). In fact if you just drag left/right on the sprite height attribute the anchor does this as well. Is this the way it is supposed to work? If so, how do I do a tween height and not affect the width on an anchored sprite?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TweenHeight changing anchor left and right
« Reply #1 on: April 30, 2014, 06:51:34 PM »
I just tried making a new scene, adding a sprite and anchoring it, then using TweenHeight to change its height. Works as expected, width is not changed.

Anadin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: TweenHeight changing anchor left and right
« Reply #2 on: June 02, 2014, 12:46:57 AM »
So, I can make this happen reliably but ONLY if I set the game view to 5:4 aspect ratio...

Very odd indeed. Just did with NGUI 3.6.2

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TweenHeight changing anchor left and right
« Reply #3 on: June 02, 2014, 11:33:39 PM »
I think JJ and I looked into this back then, and it turned out to be some issue with non-even window dimensions if I recall correctly... like 1280x721 instead of 1220x720. But my memory of this is fuzzy.