Hi everyone,
I know there are some topic about this issue. I tried most of the things but failed. I think im missing a small detail but i can’t see it.
In my scene im removing a GLTF and load another GLTF. I have a function to remove models. And the code is like this.
mC3DGLTF.scene.traverse(function (obj) {
if (obj instanceof THREE.Mesh) {
obj.geometry.dispose();
obj.material.dispose();
mC3DGLTF.scene.remove(obj)
console.log(obj)
}
});
mScene.remove(mC3DGLTF.scene);
mRenderer.renderLists.dispose();
The model in the picture has pillows. And you can click pillows to change color. After clicking the pillow you get a message as in the picture.
After removing the model i load another model and it doesnt have any pillow. But when i click at the position of previous pillow i get the same message as if pillows were still there. I think they are still there but just can’t see them.
How can i solve this problem. Could you please help me?