jellewie / Unity-Gnorts

Gnorts an RTS unity game
11 stars 7 forks source link

Draw building in hand on top of everything #80

Open JorisVanEijden opened 5 years ago

JorisVanEijden commented 5 years ago

If you have a small building in your hand and you hover over a larger building then the larger building covers up the transparent red building in hand. The building in hand should really be drawn on top of evrything else. I tried a lot of things but couldn't get it to work. The most obvious: enabling ZWrite and increasing RenderQueue don't seem to work at all.

jellewie commented 5 years ago

This is possible, will pull some ropes for this one, get back to me in a while. There was something that you could get objects to be rendered later I believe, this will draw them on top of others. (Can be wrong here)

jellewie commented 5 years ago

Quote: "Its need to be rendered in a different draw call, that can even be before the UI, just search 'draw gameobject on top unity' on Google. what also would be possible is to make a new shader, wich has no depth, so it's always on the front. And than at this render shader to the object inhand"