# TransfromControls can't attach to selected objects. TransformControls move separate from selected objects

**URL:** <https://discourse.threejs.org/t/transfromcontrols-cant-attach-to-selected-objects-transformcontrols-move-separate-from-selected-objects/42534>\
**Category:** Questions\
**Tags:** transform-controls\
**Created:** [September 14, 2022, 10:22am UTC](https://discourse.threejs.org/t/transfromcontrols-cant-attach-to-selected-objects-transformcontrols-move-separate-from-selected-objects/42534 "2022-09-14T10:22:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinduynguyen](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/justinduynguyen/32/29001_2.png) [@justinduynguyen](https://discourse.threejs.org/u/justinduynguyen)\
**Post date:** [September 14, 2022, 10:22am UTC](https://discourse.threejs.org/t/transfromcontrols-cant-attach-to-selected-objects-transformcontrols-move-separate-from-selected-objects/42534/1 "2022-09-14T10:22:55Z")

</div>

I try create simple scene with very simple setup for TransformControls but it not working as it should be.

[https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/c/1/c1de060071993914232fbce00c98ef212c1c0dd4.mp4](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/c/1/c1de060071993914232fbce00c98ef212c1c0dd4.mp4)

this my code:

```javascript
 this.m_TransformControls = new TransformControls(this.m_Camera,this.m_Canvas);
        EventManager.Instance.Subscribe(EventType.SELECTED,(obj: Object3D) =>
        {
            this.m_TransformControls.attach(obj);
            this.m_SceneManagementEditor.Scene.add(this.m_TransformControls);
        });

```

thank you in advance 😄

---

<div class="post-metadata">

**Author:** ![Qiumeng12](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/qiumeng12/32/19371_2.png) [@Qiumeng12](https://discourse.threejs.org/u/Qiumeng12)\
**Post date:** [September 15, 2022, 7:28am UTC](https://discourse.threejs.org/t/transfromcontrols-cant-attach-to-selected-objects-transformcontrols-move-separate-from-selected-objects/42534/2 "2022-09-15T07:28:50Z")

</div>

Here is a simple example of TransfromControls, hopefully it will help you find the problem.  
[https://codepen.io/qiumeng12/pen/zYjNvGO](https://codepen.io/qiumeng12/pen/zYjNvGO)
