Need to remove lines from created Square

I have created a Squares using CreateLines and Lines using same method.
Now I want to remove line from the squares without cut the line (Line will remain the same size).
I want to remove only some part of the lines which intersects the squares.
There may be multiple Squares available.
Here is the Demo of the same:
Please click to see playground of the same.

Hello and welcome to the Babylon community!

For this, you can break down your line into multiple smaller lines according to the squares’ positions. I did this for the first line so you can have an idea of how to tackle this: Create square using Vector3 array. | Babylon.js Playground (

Yes you are right but As I mentioned in description I don’t want to break down the line. Because square count is not limited and they are of dynamic size.

Could you tell what is the visual result which you expect and why you don’t want to break the lines?

Sure, I want the squares open. I attached the image so you can understand why I Don’t want to break the lines.


With the picture it makes more sense :slight_smile:
From the first sight I think it is possible to do with renderingGroupId (probably in this case you’ll need to add an invisible plane to the square).
See this thread with different examples -

1 Like

Hello @gunjalray89 just checking in, do you still have questions?