Author Topic: Can Someone please explain how I'm supposed to tween the Camera? (Or Panels?)  (Read 4770 times)

johnnyr

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Hi all. I'm trying to transition between panels. Seems simple, right?

  1. void OnClick(){
  2.        
  3.                 TweenTransform.Begin(cam.gameObject, 1f, target);              
  4.                
  5.         }

Does nothing. I have two panels, both under the same UI & anchor. I've disabled the anchor.

I've tried putting the target panel behind, to the side, in front....and nothing seems to work. Can someone explain how this is supposed to work?

Thank you!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
TweenTransform adjusts the position and rotation from the current values to the target transform's.

It will not transition panels for you.

johnnyr

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
TweenTransform adjusts the position and rotation from the current values to the target transform's.

It will not transition panels for you.

Ah, ok. Could you point me in the right direction as to how one does transition from menu to menu (or panel to panel)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Menu example that comes with NGUI is a good start.