- Home /
Question by
bnatividad · Apr 04, 2015 at 08:32 PM ·
cameraviewportclippingclip
How to use 2 tk2dCameras, the 2nd one with "viewport clipping"?
Hello,
I have a problem using Unity with tk2dCamera/camera. My game is like tetris with falling blocks. I want to clip the blocks outside of a certain rect. As you can see below, I have setup 2 cameras: 1 for the background and UI, and another 1 for the blocks itself.
Here's what I have done so far:
Set camera 1 culling mask to all except layer "Box"
Set camera 2 culling mask to "Box", depth 1, clear flags: Don't clear
So far the Layers are working but does not "clip" the blocks if part of it is outside the 2nd cameras.
What to do? Is there another way to do this?
Thank you in advance.
layers.png
(15.0 kB)
Comment