we are cloning an entity (helmet) and parenting it to one bone of our player. When we are destroying the player, the helmet is still rendered even if the entity is destroyed. The helmet is no more in the hierarchy and the entity of the helmet is null. The destroy function is also invoked on components of the helmet entity.
Are we forgetting something after parenting the helmet to the bone and destroying his root?
Thank you,
David
To destroy, I’m only destroying the root entity (the player) of the helmet. What I was saying is that I was verifying that the destroy was called on the helmet by putting a component with a destroy: function() { console.log('destroying'); in it. I also verified that the helmet entity was no more in the hierarchy by console.log all the children of the scene root. But the helmet is still rendered even if the helmet entity is destroyed (his root entity is destroyed in fact).