I’m on it:)
Yo @bghgary … Here is a playground showing trace lines (created with CreateLines) that just disappear for a while… Then will come back for a sec and disappear again. Lines 72 - 92 deal with
the CreateLines calls: Babylon.js Playground
Please see if you can tell why the LinesMesh fails to render sometimes ???
It seems the bouding infos are not refreshed when updating a LineBuilder.
Corrected playground: https://www.babylonjs-playground.com/#75U928#1
It does seem like the bounding info should be automatically updated when creating an instanced line mesh. @Deltakosh What do you think?
From my memory, as the time we (I) created some of the dynamically updatable shapes (with the parameter instance passed back to MeshBuilder), the BInfo was updated at the mesh/line creation time.
Then, when updating again, say each frame for a dynamic morphing for instance, the BInfo recomputation was not done by default for performance reasons. It was up to the user to decide whether he wanted or not to recompute it according to his needs and his current mesh : when dealing with a 10K vertex ribbon or line, maybe he doesn’t care about this feature, but when dealing with a 100-1000 vertex intersectable mesh he probably wants it anyway.
[EDIT] That said, it could probably be integrated inside the loop that updates the vertex positions in the dynamic update process, just like it’s done in the SPS (optional BInfo computation), in order to NOT reiterate over all the vertices just to update the bbox :
Thanks @Evgeni_Popov … That’s was it