- Home /
Question by
josiahsrc · Jul 20, 2019 at 05:06 PM ·
renderinglinerenderervertices
Line renderer jagged display issue
Hello, I came across a weird jagged-ness issue with line renderers today. I've tried tampering with the settings for a while, but no dice. I was wondering if anyone has stumbled across this issue and knows how to fix it? I'm working with unity 2019.1.0f and updating the line via code.
Code:
private void UpdateLine(IEnumerable<Slot> slots)
{
line.positionCount = selector.SelectionCount;
if (line.positionCount == 0)
{
line.enabled = false;
}
else
{
line.enabled = true;
int index = 0;
foreach (var slot in slots)
{
Vector3 pos = slot.Position;
pos.y += yOffset;
line.SetPosition(index++, pos);
}
// simplifying doesn't fix the issue either
// line.Simplify(tolerance);
}
}
Current settings (I've tried many other settings as well, couldn't get it working):
Results:
Expected: Lines are expected to be straight, not jagged.
Thanks for any help!
settings.png
(56.8 kB)
results.png
(377.0 kB)
Comment
Try setting your alignment to "View", not transform 'Z'. It's the only time I have ever seen goofy lines like that.
Hey @Vega4Life I tried doing that, same issue :/ I'm thinking maybe it's a bug? Thanks for the response though!
align-view.png
(327.4 kB)