- Home /
Line Renderer in World Space
Hi
I have a line renderer in world space, but funnily enough it's only visible in the camera when its in a certain position (pretty much only when the camera is right in front of the line). The line renderer is in a game object on a canvas. I'm developing for VR (and the line renderer is acting like some sort of a line graph right now)
I'm wondering why this happens, and how it can be fixed?
Edit:
I have multiple elements on the canvas.
This is the canvas inspector:
And this is the line renderer in inspector
I use a script to change the values in line renderer for its position in world space, material and color. I've tried moving it infront of my canvas.. and that helps a bit but in VR, it looks really awkward since its obviously infront of the canvas and not on it.
Answer by tormentoarmagedoom · Jun 18, 2018 at 08:00 AM
Good day.
Thios canvas have more elements? or only the Line renderer? how you see the orther elements? How is you canvas configurated? Can you post a screenshot of the Canvas inspector whith all sections expanded to see how is config?
And a screenshot of the linerenderer inspector.
Thanks!
Hi i've edited my post with some screenshots. Yep There's more elements. I can see all the other elements fine no matter where the camera is, its just the line renderer acting funny. Note that I haven't actually been able to test it on my HTC Vive to see if i can see it in game, I'm just basing this on the 'Game' window in unity
Answer by glenneroo · Apr 05, 2019 at 02:09 AM
You could try XRLineRenderer from Unity which is built specifically for XR/VR.