For example, consider if someone wanted to draw a pie graph on some terrain. But the graph lays on top of the terrain. In my case, I just want to draw a circle on top of a Cube.
I suppose I could draw a 3D disc if I had to. Any thoughts?
For example, consider if someone wanted to draw a pie graph on some terrain. But the graph lays on top of the terrain. In my case, I just want to draw a circle on top of a Cube.
I suppose I could draw a 3D disc if I had to. Any thoughts?
You could use a projector placed above the cube or you could manually place a plane with the pie graph texture on it directly above the cube.
However, if all you wanted to do was simply draw a solid circle of one color, you could create a cylinder gameObject, set the Y scale to something like .01, place that cylinder above your cube, set the material's color to whatever color you need, and scale that using Vector3.Scale.
© 2022 - 2024 — McMap. All rights reserved.
The only problem with using a texture is that I want the circle to be able to grow/shrink as the user moves a slider.
– ConvexoconvexBut I'll try the Projector approach.
– ConvexoconvexHmm... so what if I use the Projector approach but still want a circle to grow/shrink? Is this going to be possible?
– ConvexoconvexYup, all you have to do is set the projector to orthographic, then change the projector's A) height above the cube or B) orthographic size. Here's the script reference for projectors: http://unity3d.com/support/documentation/ScriptReference/Projector.html Also, don't forget to accept and upvote this Answer if it works for you. ;)
– MccarverThanks! And don't worry, I won't ;)
– Convexoconvex