- Home /
The solution was simpler than I had imagined. Choosing the proper shader (I used one of the particle shaders) displayed the shape properly within the 3D space.
Render a custom 2D shape within a 3D environment
I am aware of other similar questions regarding 2D sprites within 3D project but my issue is slightly different. I am creating a shape in code:
msh = new Mesh();
filter = gameObject.AddComponent(typeof(MeshFilter)) as MeshFilter;
gameObject.AddComponent(typeof(MeshRenderer));
filter.mesh = msh;
I go on to create a list of vertex points, calculate triangles, all that good stuff. My problem is when I try to display this shape, which is an aura around the player that "collides" with walls, it displays on top of 3D objects above it. How might I modify this shape so it can have depth within a 3D scene?
I will gladly post more code on how my shape is calculated but I don't think that is an important part of this problem.
Follow this Question
Related Questions
Unity cam problem 1 Answer
Seing through triangles in runtime edited mesh 0 Answers
3d collider mesh to 2d collider mesh 0 Answers
3D Text Mesh - Display Glitch 0 Answers