Search Unity

Question about graphic raycasting with overlay cameras

Discussion in 'Universal Render Pipeline' started by Chris_DC, Nov 3, 2020.

  1. Chris_DC

    Chris_DC

    Joined:
    Dec 7, 2016
    Posts:
    7
    I just started using some of the new URP camera system with a base camera, and a few different overlay cameras. 2 of these overlay cameras have screen canvas on them, with one occasionally on top of the other. The issue I am having is that the camera that renders behind is absorbing the graphic raycast before it gets to the overlay camera that is in front. It seems like it travels down the overlay stack, but it feels like it should almost be reversed. Where the graphic raycast hits the top level camera first.

    Is there a way to reverse this? I found if i turn off all grahpic raycast blocking on the bottom camera it allows it to go through, but this is not the behavior i am looking for.

    Thanks for any help, or let me know if you need more information.
     
  2. wechat_os_Qy04IIDU6ofq72CGj2Z19oqDE

    wechat_os_Qy04IIDU6ofq72CGj2Z19oqDE

    Joined:
    Aug 17, 2021
    Posts:
    1
    I got same problem, and then I tried several samples with URP. But it seems that while using camera stack to render mulitiple world space/screen space canvas, the graphic raycast's result order is not predictable...did you find some solutions?