Search Unity

How to force SpriteMask to face camera

Discussion in '2D' started by Deadcow_, Feb 28, 2019.

  1. Deadcow_

    Deadcow_

    Joined:
    Mar 13, 2014
    Posts:
    135
    I'm using some sprites in 3d game with perspective-like camera. Sprites and camera have the same rotation and all works well. Now I need to create some sort of screenspace dissolve effect for a bunch of sprites and SpriteMask will fit well, but I discovered that SpriteMask only working with "default 2d camera" without rotation.

    Is there a way to make SpriteMask to face camera with rotation?

    We're using HDRP by the way
     
    Last edited: Feb 28, 2019
  2. Deadcow_

    Deadcow_

    Joined:
    Mar 13, 2014
    Posts:
    135
    I'll illustrate my problem, just in case

    2019-02-28_18-44-03.png 2019-02-28_18-44-51.png 2019-02-28_18-45-58.png
     
  3. ed_s

    ed_s

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    165
    I'm able to make a simple scene in HDRP with a sprite and sprite mask that worked with a rotated perspective camera.

    Can you make a bug report with a small sample project? That may help figure out why it's not working for you.
     
  4. Deadcow_

    Deadcow_

    Joined:
    Mar 13, 2014
    Posts:
    135
    I forget to mention we use isometric camera. It may cause such behavior? I'll check this out on Monday