# Is that the attachedNode setter wrong?

**URL:** <https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473>\
**Category:** Questions\
**Tags:** gizmo\
**Created:** [May 18, 2022, 2:11am UTC](https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473 "2022-05-18T02:11:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aze](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aze/32/23050_2.png) [@Aze](https://forum.babylonjs.com/u/Aze)\
**Post date:** [May 18, 2022, 2:11am UTC](https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473/1 "2022-05-18T02:11:29Z")

</div>

> [@What is the difference between attachedMesh and attachedNode?](https://forum.babylonjs.com/t/what-is-the-difference-between-attachedmesh-and-attachednode/29161):
>
> I read the gizmo \_update method，it seems like no different.

Like the above topic.AttachedNode is a new accessor to support for nodes.So we use attachedNode can effect that seem like attachedMesh?But it can not effect obviously.Because some gizmo method will use attachedMesh,but it is null when we use attachedNode.Is there something I misunderstood?

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/9/a923ebfc8ea2f44a58ecd1c09fd499e29f0effd0.png)

---

<div class="post-metadata">

**Author:** ![Aze](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aze/32/23050_2.png) [@Aze](https://forum.babylonjs.com/u/Aze)\
**Post date:** [May 18, 2022, 2:15am UTC](https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473/2 "2022-05-18T02:15:04Z")

</div>

I think that the attachedNode accessor is not to compatible with attachedMesh.It use in other ways,like the doc said boundingBoxGizmo only support mesh.So we should not use attachedNode in boundingBoxGizmo.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 18, 2022, 3:10pm UTC](https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473/3 "2022-05-18T15:10:08Z")

</div>

Yup maybe we should override it and log a message in this one @carolhmj ?

---

<div class="post-metadata">

**Author:** ![Aze](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aze/32/23050_2.png) [@Aze](https://forum.babylonjs.com/u/Aze)\
**Post date:** [May 19, 2022, 3:12am UTC](https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473/4 "2022-05-19T03:12:21Z")

</div>

Is it because of the previous implementation that boundingBoxGizmo only works with meshes?Like the doc said:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/5/f5f58f876beefd813fd4d567e3956627e0507e8f.png)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 19, 2022, 1:02pm UTC](https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473/5 "2022-05-19T13:02:47Z")

</div>

It is because a transformNode does not have a bounding box 🙂 but attachedNode is part of the base class. @carolhmj is working on it.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 19, 2022, 1:02pm UTC](https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473/6 "2022-05-19T13:02:53Z")

</div>

Assigned @carolhmj on May 19, 2022, 1:02pm UTC



---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [May 20, 2022, 11:45am UTC](https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473/7 "2022-05-20T11:45:25Z")

</div>

Added a PR to warn the user: [Add warning to Bounding Box Gizmo by carolhmj · Pull Request #12551 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/12551)

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [June 2, 2022, 6:54pm UTC](https://forum.babylonjs.com/t/is-that-the-attachednode-setter-wrong/30473/8 "2022-06-02T18:54:22Z")

</div>

Unassigned @carolhmj on June 2, 2022, 6:54pm UTC


