A
A
Anna2016-07-04 18:03:41
three.js
Anna, 2016-07-04 18:03:41

Delete object. Why does not it work?

I receive the object, everything is fine.

ObjectEDIT = scene.getObjectById(interEdit[0].object.id,true);
scene.remove(ObjectEDIT);

But the object is not deleted, what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anna, 2016-07-05
@KupueIIIKo

Here's what I figured out if an object can only be deleted via the parent. That is, if you found the object via getObjectById. Find its parent and delete it through the parent.

var ObjectEDITParent = ObjectEDIT.parent;
ObjectEDITParent.remove(ObjectEDIT);

Google doesn't know.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question