- Home /
"Warping/Teleporting Out" Objects in space
I'm trying to pass an object into a the middle of a ring (made of particles) such that the object is not visible before it passes, but becomes visible after it has passed.
As you can see, I want the glowing ball to pass through the particle effect, and when the ball passes through, it becomes visible. The goal is to make it look like the ball has "Warped/Teleported" into the scene
What would be the best way to do this?
One way I thought of was to put a collider in the middle of the ring and put an on collider event to make the ball visible, however this is not really great because the ball would end up just being visible immediately. I need only the parts of the ball that has gone through the ring to become visible (So it looks much more realistic!)
Answer by japanitrat · Sep 09, 2011 at 10:00 PM
I think what you want, is a clipping shader. check out the unity forums here and here. I don't think that plain slicing is going to look cool, though. Your first idea seems better to me, just needs a bit improvement. For instance, you can make the object appear slowly over time when it made contact with trigger collider. Additionally pull a particle effect out of the hat, eventually also stretching it a little.
Nah, making it appear slowly just makes it... appear slowly.. It won't give the impression that the ball is co$$anonymous$$g out of the ring. I'm having a look at those clipping shaders. The one Aras posted up seems like what I need, except it's the opposite. I need the ball to appear everywhere other than the clipping box, whereas in Aras' version the ball would only appear IN the clipping box, but it's somewhere to start with, thanks!
Answer by DaveA · Sep 09, 2011 at 10:02 PM
I'm not sure this will help, but I'd bet there's a way to use multiple cameras in different layers to render sorta masked-off parts, perhaps you'd need a shader for it.
I don't think so. I'm already using two cameras, one for the background and skybox and the other for everything else. $$anonymous$$y problem is the ball needs to be visible at different places/time of the scene, so I don't think multiple cameras can help unless I'm missing something?