coderock
coderock

Reputation: 143

switching from one camera to other in unity ,view entering from right

I have two cameras in the same position.I want to switch from one camera to other (with a transition effect) such that second view replaces the first camera view entering from the left side moving inwards and filling the screen.. Camera fading in and fading out effects are available in unity wiki..Can anyone suggest me a technique to achieve this effect..

Upvotes: 1

Views: 1835

Answers (2)

Reaper
Reaper

Reputation: 47

While i'm not really really sure of the application for the switching of the camera if you were to instantiate it dynamically you would be able to use lerp and other function calls to manipulate behavior and not need to use multiple cameras.

http://docs.unity3d.com/Documentation/ScriptReference/Vector3.Lerp.html

As a side note i'm sure you could reverse engineer some camera effects similar to this one in order to achieve the background(a little confused about what you want to do with that)

http://docs.unity3d.com/Documentation/Components/script-CameraMotionBlur.html

Upvotes: 1

Valentin Simonov
Valentin Simonov

Reputation: 1768

You can try to animate Camera.rect. Otherwise you will have to render both in a RenderTexture and combine rendered images in a small shader with a translate parameter changing from 0 to 1.

Upvotes: 1

Related Questions