Connect lines at different parent

hi,
I wanted connect lines at different parent.

I try few times.
but, failed.
and I don’t know, why this happend.

this is my codepen

yeah,
there is draw a line.
but, that’s not what I want.

I want draw a line between ‘1 layer’ and ‘2 layer’ (not 3 layer)

please help me. thank you a lot

Fixed code: https://jsfiddle.net/j5mouhez/

A couple of things were missing. Most importantly you have to add the line to the scene and not to the start object since you have defined its vertices in world space. If you add it to the start object, you apply the parent’s transformation twice.

thank you @Mugen87

by the way,
if I move the layer position, how can I update line position dynamically?

Well, you also have to update the geometry data of the lines.

nice, thank you!