- Home /
How to fade in/out the view of a specific Camera?
Very interesting question here...
I would like to fade in/out everything a specific camera sees. For example, if the player hits the radar button, he should be able to see things he normally wouldn't.
I have that working beautifully. When players press a button, they see unique objects for a limited time. What I'm doing is enabling and disabling the camera that sees these objects and setting it to depth only. Its okay if it looks as if its over lapping. Everything actually looks amazing.
Now!!! My questions is: can I fade in/out the enabling and disabling of the camera?
It would add a neat affect and I just need a push in the right direction. I did some research and I can't seem to find anything.
Thanks in advance!!
Answer by Andres-Fernandez · Apr 16, 2015 at 06:40 AM
Now!!! My questions is: can I fade in/out the enabling and disabling of the camera?
I don't know if you can do that. The first thing that comes to my mind is setting the depth of the first camera so you see through the second one, then render the first camera into a texture, set the texture in front of the second camera and fade the texture to transparent.
I'm thinking this is the best way to do it. I'm gonna run a few tests. Otherwise, I'll have to work around it and maybe have the camera blink when the camera is about to turn off.
Answer by Tactical_Beard · Apr 16, 2015 at 09:49 AM
You can with these two scripts from the wiki. Add the two cameras to the Crossfade script and then set the curve. Press play and you have to press space bar to start the fade. I got an error with it but it still works (comment it out). It might not be exactly what you want your looking for but I hope it helps.
CrossFadeExample.js http://wiki.unity3d.com/index.php?title=CrossFade
ScreenWipe.js http://wiki.unity3d.com/index.php/ScreenWipes
Unfortunately, it locks the first cameras movement and position. The camera it fades into still moves. It creates a very interesting (but not what I'm going for) look.this is a great find though!
Your answer
Follow this Question
Related Questions
How can I set a following camera which doesn't rotate with the object 1 Answer
How to keep FPS Camera from flipping? 0 Answers
Set Max Rotation On Weapon Sway 0 Answers
How to make raindrop effects on camera? 2 Answers
Motion Blur Effect for Camera 1 Answer