I am facing a challenge with a complex 3D object that has the following structure:
[] Group
- [] Children
- [] Children
- Child 1
- Child 2
- Child 3
- [] Children
My goal is to remove Child 2 from this structure. Here is my approach:
const child = model.children[0].children[2]
model.remove(child)
Despite trying numerous variations of this code, I have been unsuccessful in achieving the desired outcome. Any assistance would be greatly appreciated.
Update
Although I was unable to successfully remove objects, setting the "visible" property to false proved to be effective.
model.children[0].children[2].visible = false