Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by richardzzzarnold · Nov 21, 2011 at 01:12 PM · multiplecamerascrossfade

CrossFade between multiple cameras

I am trying to adjust CrossFadePro.js into a version for multiple cameras but am not sure if it possible. So far I have made it like this (using ScreenWipes.js as well of course) ..It looks like it is almost working Any suggestions on how i can make it work?

 var camera1 : Camera;
 var camera2 : Camera;
 var camera3 : Camera;
 var camswitch1 : boolean;
 var camswitch2 : boolean;
 var aaa: float;
 var customButton : GUIStyle;
 var fadeTime = 2.0;
 private var inProgress = false;
 private var swap = false;
 
 function OnGUI() {
   if(GUI.Button(Rect(Screen.width/aaa-Screen.height/22,Screen.height/1.3,Screen.height/20,Screen.height/20),"",customButton))
     choose();
     }
 
 function choose()
 {
      if((camswitch1==true)&&(camswitch2==true))
         {
       
         fade1();
         camswitch2=false;
         }
         else if ((camswitch1==true)&&(camswitch2==false))
         {
       
         fade2();
         camswitch2=false;    
         }
         else  if ((camswitch1==false)&&(camswitch2==false))    
         {
         
         fade3();
         camswitch1=true;
         camswitch2=true;
         }
         
  }
 
 
 function fade1 () {
     if (inProgress) return;
     inProgress = true;
    
     swap = !swap;
     yield ScreenWipe.use.CrossFade (swap? camera1 : camera2, swap? camera2 : camera1, fadeTime);
    
     inProgress = false;
 }
  function fade2 () {
     if (inProgress) return;
     inProgress = true;
    
     swap = !swap;
     yield ScreenWipe.use.CrossFade (swap? camera2 : camera3, swap? camera3 : camera2, fadeTime);
    
     inProgress = false;
 }
  function fade3 () {
     if (inProgress) return;
     inProgress = true;
    
     swap = !swap;
     yield ScreenWipe.use.CrossFade (swap? camera3 : camera1, swap? camera1 : camera3, fadeTime);
    
     inProgress = false;
 }
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by bingont · Feb 01, 2012 at 09:12 PM

i am working on a similar script. i tried modifying your script to toggle camera views on space matching the crossfade example. it seems to work but i think the problem lies with camera depth values. so now i am trying to figure out how the screen wipe script is manipulating the camera depth values. if you have already figured that out please let me know, i would really appreciated.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Raycast with multiple camera's in scene 0 Answers

Multiple cameras running in full HD 1 Answer

Unify Com. -Camera CrossFade Pro- OverlayCam Getting Faded During Transition? 0 Answers

Multiple cameras increasing draw call count immensely 1 Answer

AudioClip GetData SetData Multiple Source Overlap 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges