Deleted mesh interactively

Hello everyone

i have 1000 with the same size i want to know how can i select some of them interactively and then deleted them. I want to know is it possible to do this?

Pinging @msDestiny14 :slight_smile:

1 Like

Hi, working on this. Will get back soon. :slight_smile:

Hi again! @Arash_Bagheri

Found this demo I think might be what you’re looking for: https://www.babylonjs-playground.com/#Q5KMXP#5

Once you have all the objects selected you can then delete them/do whatever you want to them. Hope this help!

3 Likes

Hi , tnx for helping me, but how can i delete the cubes?

scene.removeMesh(boxes[i]);

(I’m not sure what happens to the memory in this case, for example if you try to access boxes[i] what would it give you)

1 Like

the object will be disposed but the js part of it will be there as we cannot REALLy delete it. you can simply set boxes[i] = undefined to completely wipe it out

3 Likes

thank u so much

tnx a lot