Step 1: Part I: the WormHole Camera Setup.
Two camera are better than One. So first, Create Two Cameras and re-name them to foregroundCamera and backgroundCamera.
Next, you should Split the game screen for each camera by adjusting their values in the Viewport Rect.
Then, you should Rotate both cameras 180 on the Z Axis. (This will flip the cameras upside down.)
Finally, change the foregroundCamera
Clear Flags to Solid Color
And Background to Black.
Step 5: Part Two: the WormHole Effect.
The Wormhole effect is achieved by limiting how Near or how Far a camera is allowed to see. If you give the exact value to foregroundCamera Far and backgroundCamera Near, the two cameras will create a meeting point that allows objects to travel seamlessly between cameras, thus Display Screen.
Step 6: The Wormhole Secret.
Simply adjust the Clipping Plane Values inside both cameras.
(This value will depend on the location you want to create a wormhole.)
Step 7: Part III: Third Eye
After pressing play you might have noticed an ugly break in the middle of the game floor.
One solution for a solid floor is to use a Third Camera. The Third Eye.
First, Duplicate the background and rename it to thirdEye. (Optional name.)
Next, Create a New Layer called Floor.
Change the Floor Game Object to have the Floor Layer.
Also, change the Culling Mask on the thirdEye Camera to only see the Floor.
Now you should adjust Clipping Planes as shown.
Remember to change Depth to -1. This will place the floor behind everything in the scene.
(This will allow you to see the entire floor instead of splitting it.)
Also, you should Remove Floor from Culling Mask in both backgroundCamera and foregroundCamera.
The final step is to change the backgroundCamera Clear Flags: Depth Only.
Your Game Tab Window should look similar to this.
That’s it for this tutorial!
I cant wait to see what you guys develop using my techniques!
Step 15: Additional Info: the Darkest Place in the Universe
Ghosts like to hide in the shadows. You need to understand a couple laws to properly summon a visible ghost in your games.
Digital Black Holes
It appears that the spirit realm has no detectable features; it is pure darkness there, making it impossible to observe Ghosts without a light source.
Blackdoes not reflect light. So will not project onto the 2dg-host screens. Keep this in mind when making game art.
White should give you Solid Ghosts.
Colors will summon Translucent Ghosts.
Notice that when two translucent ghosts over lapping each other, combined they make another color. : )
The 2DG-Host a great color demonstration device if needed one.