UnityGradientBackground icon indicating copy to clipboard operation
UnityGradientBackground copied to clipboard

Distance between Background and Camera

Open dennzy opened this issue 7 years ago • 1 comments

Hello Mr. Ferreira,

thank you very much for providing this script. It is really easy to use and very well documented for beginners like me. The only issue I have is that I can't control the distance between the drawn Quad and the Camera. When I start the Scene all Objects with a negative Z position are "behind" the background and unfortunately I rely on this in my project. I tried change the Vertex values in the CreateQuadMesh() method but it seems as the actual position is set somewhere else? Since I'm not an experienced programmer I'm guessing on the .DrawMesh function. But I'm confused by the Matrix4x4.identity thing.

Maybe it would be possible to implement a public variable that lets the user manually control the distance? I'm sure this could be a usefull feature for other users aswell. Again thanks for providing this script and if you could give me a little hint how to add an offset on the Z axis I would be very gratefull.

Best regards

D.H.

dennzy avatar Sep 03 '18 11:09 dennzy

Just wanted to give a short update: I solved my issue by using two cameras and rendering layers. Maybe that's just the way how use this kind of shader.

Again thanks a lot for providing this wonderfull asset. Works perfeclty now.

dennzy avatar Sep 06 '18 14:09 dennzy