Creating Triangulation Mesh from Line Renderer Shape

Hey, does anyone have any resources they could point me to that would help me understand how the Quest Guardian floor drawing is done. I want to use something similar where I paint on the floor using a raycast and after I draw the shape then it converts to a single mesh. I am assuming this is some sort of shader that reveals where drawn?

The only con to using the line renderer is that I notice that when your drawn line over laps itself it creates a single mesh from that object. Am over thinking this? Is is possible to use a shader and just draw and reveal what is underneath? But how would it fill in the shape?

Example

Seems like a lot of random questions with a random video…

Here is how to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

This is the bare minimum of information to report:

  • what you want
  • what you tried
  • what you expected to happen
  • what actually happened, especially any errors you see
    - links to documentation you used to cross-check your work (CRITICAL!!!)

If you want examples of geometry creation in Unity, you’re welcome to check out my MakeGeo project.

MakeGeo is presently hosted at these locations:

https://bitbucket.org/kurtdekker/makegeo

If you have questions about ordering and stacking and layering:

Three (3) primary ways that Unity draws / stacks / sorts / layers / overlays stuff:

In short,

  1. The default 3D Renderers draw stuff according to Z depth - distance from camera.

  2. SpriteRenderers draw according to their Sorting Layer and Sorting Depth properties

  3. UI Canvas Renderers draw in linear transform sequence, like a stack of papers

If you find that you need to mix and match items using these different ways of rendering, and have them appear in ways they are not initially designed for, you need to:

  • identify what you are using
  • search online for the combination of things you are doing and how to to achieve what you want.

There may be more than one solution to try.

Additional reading in the official docs:

And SortingGroups can also be extremely helpful in certain circumstances: