All line meshes go missing on camera move

The scene is a bit hacky but show the gist of running into a major issue. Was using a single LinesSystem mesh to generate “lollipops” to meshes. However rotating the camera all lines disappeared. Thought its might be some global culling. Changed all lines to individual meshes and it still happens.
Appears only happen when using the line’s updateMeshPositions; which I need to use to update per frame. Is there another call I’m missing to stop this or am I using it wrong?

It’s because the bounding boxes aren’t being recomputed, you can do


to make it work:

instead of using updateMeshPositions(), you could use the parameter instance from MeshBuilder.CreateLines

@jerome It appears even if you use the instances you still need to call l.refreshBoundingInfo();

yes, that’s true

if your lines are always in the camera frustum, you can also mark them as always active :
line.alwaysSelectAsActiveMesh = true

1 Like