Hello Guest

Author Topic: Mask a certain area of level  (Read 5170 times)

BitEver

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
Mask a certain area of level
« on: July 09, 2013, 07:30:10 pm »
Hello,

I wonder if this can be done:



I have a sprite that goes slowly down the level, and I want to do that when passing through certain areas this sprite disappears.

I tried with ClippedSprite, but not the solution, because I need is that only disappears in certain areas.

Any solution??

Cocos 2D is that GLScissor used for what I want to do, but not how to do with Unity and 2D Tool Kit

Thank you.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Mask a certain area of level
« Reply #1 on: July 09, 2013, 09:41:06 pm »
You can't do GLScissor in Unity, its not exposed.

But all is not lost. Look at how 2D Toolkit does clipping in the UI, eg. in the scrollable area. There is the mask object you can place in the scene to basically mask everything inside the volume.

BitEver

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Mask a certain area of level
« Reply #2 on: July 09, 2013, 11:29:42 pm »
Oh, it's great!

Sorry for not having seen this before.

Thank you very much unikron, perfect as always.

Cheers!