Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: dobe on September 25, 2012, 09:58:54 AM
Title:
how to: Transitioning from one panel to another with a camera
Post by:
dobe
on
September 25, 2012, 09:58:54 AM
Hello,
I'm trying to find out what the best way to transition from a main menu panel to an options panel would be.
I'd like to have the camera pan from the main menu to the options panel once the options button is released.
Currently I have one camera that appears to be embedded in my main menu;
Should I create an additional camera? Should I create a second UI root? or just use a sliced sprite for the options menu?
Any advice or links to tutorials would be super helpful.
Thanks
Title:
Re: how to: Transitioning from one panel to another with a camera
Post by:
ArenMook
on
September 25, 2012, 11:51:41 AM
How is it different from http://www.tasharen.com/forum/index.php?topic=1779.0 ?
Title:
Re: how to: Transitioning from one panel to another with a camera
Post by:
dobe
on
September 25, 2012, 12:54:40 PM
I understand how to technically pan the camera, I'm wondering what the best way to handle the situation is.
I realized that my initial post wasn't asking the question I wanted to. I attempted to remove it, but failed.
Title:
Re: how to: Transitioning from one panel to another with a camera
Post by:
ArenMook
on
September 25, 2012, 06:42:12 PM
My answer doesn't change. Start your Tween in OnPress(false).
Title:
Re: how to: Transitioning from one panel to another with a camera
Post by:
dobe
on
October 01, 2012, 08:08:27 AM
Do I add this component to the camera itself or to the button I want to rotate the camera?
I can't locate this function in either unity or NGUI API. Is there any reference to this function anywhere?
Title:
Re: how to: Transitioning from one panel to another with a camera
Post by:
ArenMook
on
October 01, 2012, 04:46:44 PM
Add it to the button.
using
UnityEngine
;
public
class
Test
:
MonoBehaviour
{
public
Camera cam
;
public
Transform to
;
void
OnClick
(
)
{
TweenTransform
.
Begin
(
cam
.
gameObject
, 1f, to
)
;
}
}