Line is not visible under some angle of view

I use this simple code to draw a line:

if (lineUniqueID == null) {
lineDirection = BABYLON.MeshBuilder.CreateLines(“lines”, {points: myLinePoints, updatable: true}, scene);
lineDirection.color = BABYLON.Color3.Red();
lineUniqueID = lineDirection.uniqueId;
else {
lineDirection = BABYLON.MeshBuilder.CreateLines(“lines”, {points: myLinePoints, instance: lineDirection});

Everything works fine - without problems, a few minutes later, then the line disappears and I can see my line from concrete angle only (ArcRotate cameras).

How can I fix the problem described?

Are you able to setup a repro PG for this one? Else we can’t do much.

Project is too large for PG :frowning: I must looking for a bug…

Maybe is the same problem/solution from here

1 Like

Described playground does not work but thanks - I’ll try it.

Oh, then check line90. this was the trick

“refreshBoundingInfo” is really solution of my problem. How this function really works? In help is one sentence about it.

I think if ‘CreateLines’ has updatable property set to true then the bounding box info of the shape is automatically refreshed, if not, you have to tell him to update the bounding box, using this function. And, I hope to not be wrong, the boundingInfo is used in the culling system

Correct (if alwaysSelectAsActiveMesh= false, which is the default);

1 Like