Search Unity

Objects not Casting Shadows Correctly

Discussion in 'General Graphics' started by RPKMN1, Oct 11, 2020.

  1. RPKMN1

    RPKMN1

    Joined:
    Feb 13, 2017
    Posts:
    36
    I am working on an in-world UI element to draw circles around the feet of selected characters a la Baldur's Gate. I needed them to always draw on top of the ground, so I did the technique of putting them on a separate layer and having them be rendered by a different camera and then using a culling mask and camera depth to force it to render the circles on top of the ground.

    Of course, the next problem I had was that my circles were being drawn on top of my characters and not just on top of the ground. So, I moved my characters to be rendered by the same camera that was rendering my circles and the problem went away.

    But now I have a different problem. My characters are no longer casting shadows on the ground. I presume because the ground and the characters are being render by different cameras?

    Am I going about this the right way? the only problem I have right now is that none of my character models cast shadows on the ground anymore. If I can fix that, I'm good to go.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,445
  3. RPKMN1

    RPKMN1

    Joined:
    Feb 13, 2017
    Posts:
    36
    I actually am using a regular mesh for the circle, but I also have a line renderer that I am doing the same thing with to show an expected path.