# Trigger when a new object is added or removed of the scene

**URL:** <https://discourse.threejs.org/t/trigger-when-a-new-object-is-added-or-removed-of-the-scene/46166>\
**Category:** Questions\
**Tags:** events\
**Created:** [December 23, 2022, 9:56pm UTC](https://discourse.threejs.org/t/trigger-when-a-new-object-is-added-or-removed-of-the-scene/46166 "2022-12-23T21:56:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheCatalan](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@TheCatalan](https://discourse.threejs.org/u/TheCatalan)\
**Post date:** [December 23, 2022, 9:56pm UTC](https://discourse.threejs.org/t/trigger-when-a-new-object-is-added-or-removed-of-the-scene/46166/1 "2022-12-23T21:56:04Z")

</div>

Hi,

I’m creating a ground plane to project the shadow, and I would like to detect when a new object is added or removed, in other to update the Z of that ground plane. Is this possible?

Like an event watcher to detect scene changes.

Thanks,

TC

---

<div class="post-metadata">

**Author:** ![tfoller](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@tfoller](https://discourse.threejs.org/u/tfoller)\
**Post date:** [December 24, 2022, 5:51pm UTC](https://discourse.threejs.org/t/trigger-when-a-new-object-is-added-or-removed-of-the-scene/46166/2 "2022-12-24T17:51:42Z")

</div>

It’s possible to notify a child when it’s added/removed to the scene.

To make the scene react on adding/removing its children will require you to write custom code or modify the library.
