How can I layer images and mesh?
I am trying to use a MeshRenderer to draw a series of 2D polygons overtop of an image. I've been using the code here to generate the polygons, but no matter what I do they always render behind my image instead of overtop, regardless of where they are in the hierarchy. I can make them render overtop of the image by adjusting the Z-values of both, but when I do they start rendering on top of all the other screens in my game too regardless of their Z-values. Is there a way to make them render on top of my image but underneath all my other screens? I've read some older answers from other people with this problem but none of them have worked for me so far. I'm using Unity 2018.1.5 Personal if that helps.
Sound like the pivot z position of mesh is not in the center of the mesh. It like not the same as z-axis of game object.
not sure but this is all I can think of.
Hmmmm. Sorry, I'm not sure what you mean. In the inspector, the mesh doesn't have a Z pivot as far as I can tell - only an X and Y pivot.
I mean it was mesh vertex position. the kind of vertex at the center that will mesh pivot. $$anonymous$$aybe you didnt reset to 0 when created it.
I am not sure which code are you using so this is all i can guess what wrong
Your answer
Follow this Question
Related Questions
Feathering an edge of an image in the UI? 0 Answers
[Help Request] 2D Wave Generation & Animation 2 Answers
Add mesh to a scene in Runtime takes too long 0 Answers
How to get the width of filled image ? 0 Answers
The problem with the UI image. 0 Answers