Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Sprite Mask what does this feature mean?

Discussion in '2D Experimental Preview' started by haim96, Jun 22, 2016.

  1. haim96

    haim96

    Joined:
    May 24, 2013
    Posts:
    104
    in my game (2.5D) i have platforms sprites and player with sprite as shadow.
    i need that the shadow sprite will be cut off where the platform ends.
    does sprite mask will help me to achieve this?
     
  2. Johaness_Reuben

    Johaness_Reuben

    Unity Technologies

    Joined:
    Jan 27, 2016
    Posts:
    253
    I would say, yes it could possibly be used to solve that. But a bit more info would be helpful. A screenshot or something would be good.
     
  3. haim96

    haim96

    Joined:
    May 24, 2013
    Posts:
    104
    mask.jpg

    something like this....

    the shadow should be masked out on left side of the red line.
    i saw that to achieve this the shadows need to be child object of the platform... is that right?
    it means that i will need to re-parent the shadows object every time i move to new platform....
     
  4. Johaness_Reuben

    Johaness_Reuben

    Unity Technologies

    Joined:
    Jan 27, 2016
    Posts:
    253
    If the mask is set as a Global Mask then the shadow can still be child of the player.
     
  5. haim96

    haim96

    Joined:
    May 24, 2013
    Posts:
    104
    ohhh... that's cool! thanks!
     
unityunity