Author Topic: calling iTweenMoveTo() to move a panel menu  (Read 2572 times)

huminado

  • Guest
calling iTweenMoveTo() to move a panel menu
« on: February 22, 2013, 09:17:19 PM »
I tried moving a panel upon a button click using iTween.MoveTo().  This was for hiding/re-exposing the panel, but with some associated animation.  It seemed to work fine, except sometimes the buttons on the panel would disappear.

When I made a parent panel, and the original panel a child, and used iTween.MoveTo() to move the parent, this seems to get rid of any bad side-effects.  All the buttons stay in tact.

Is this approach "okay"?  Or am I asking for trouble?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: calling iTweenMoveTo() to move a panel menu
« Reply #1 on: February 23, 2013, 01:13:34 AM »
Multiple panels means you need to adjust the transform's Z to determine what's in front of what. It's explained in the FAQ.

huminado

  • Guest
Re: calling iTweenMoveTo() to move a panel menu
« Reply #2 on: February 26, 2013, 05:27:20 PM »
Multiple panels means you need to adjust the transform's Z to determine what's in front of what. It's explained in the FAQ.

Okay - I just found my error.  The Z value indeed changed with the move, which seems to explain the disappearing buttons.  As long as the Z value stays constant the buttons are visible, even without the parenting scheme in my OP.

Thanks!