Search Unity

masking sprites

Discussion in '2D' started by welly_59, Apr 26, 2014.

  1. welly_59

    welly_59

    Joined:
    Apr 10, 2014
    Posts:
    22
    im making a whack-a-mole clone:

    https://www.youtube.com/watch?v=gTXuOCnZc3Y

    i have a simple picture as the mole, attached to a prefab. How can i mask the mole as he goes back into his hole? ive found some stuff using shaders but tbh that is way beyond me at present.

    What i am using now is having the background below the mole hole on a different layer so that you cant see the moles body moving, just his head coming out.

    What better ways are there of doing it?

    How can i mask a sprite in a certain area?
     
  2. Pyrian

    Pyrian

    Joined:
    Mar 27, 2014
    Posts:
    301
    That's what I'd recommend.