Trying to make a 2D hole in the scene that sprites can fall in

Hi to all,

I am new to Unity and I am trying to make a 2D hole object that sprites can fall in.
Check the gif: 1609761--97743--$hole.gif

I checked in the forum and I cant find something similar to this?
Any suggestions?

Thanks

Anyone? Just point me to the right direction please…

Various methods:

  1. draw something on top to mask it.

  2. Clip it with stencil buffer.

  3. Clip it in shader.

  4. Clip it by overwriting depth values in transparent queue for that area (2D toolkit does this or a similar version here http://wiki.unity3d.com/index.php?title=DepthMask)

  5. Use your own quad and adjust uvs as it falls into the hole.

  6. Use a separate camera with different viewport region for sprites.

There’s tonnes of ways to skin this cat, and it’s basically all straightforward common sense, pick whatever you feel suits your project.

Look into the use of Collision Layers. Using those, you can set collision areas that objects can collider with, and areas they cannot collide with. The result with that is you could have the areas around the hole be on layers that do get collision, and the hole does not get collision, which would allow the object to fall through it.