# I can't make DragControl work at all. Please HELP!

**URL:** <https://discourse.threejs.org/t/i-cant-make-dragcontrol-work-at-all-please-help/15137>\
**Category:** Questions\
**Tags:** modules\
**Created:** [May 12, 2020, 5:36pm UTC](https://discourse.threejs.org/t/i-cant-make-dragcontrol-work-at-all-please-help/15137 "2020-05-12T17:36:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![I\_am\_FPS\_k](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/i_am_fps_k/32/10674_2.png) [@I\_am\_FPS\_k](https://discourse.threejs.org/u/I_am_FPS_k)\
**Post date:** [May 12, 2020, 5:36pm UTC](https://discourse.threejs.org/t/i-cant-make-dragcontrol-work-at-all-please-help/15137/1 "2020-05-12T17:36:29Z")

</div>

Hello Reader,  
I’ve searched and done everything I could to make this DragControls work for me but this doesn’t work at all.  
this is my project:  
[https://drive.google.com/drive/folders/12ToK6iwcZfsJEJ9CjZUsaapN71-InVAz?usp=sharing](https://drive.google.com/drive/folders/12ToK6iwcZfsJEJ9CjZUsaapN71-InVAz?usp=sharing)

Can someone help me with it, what am I doing wrong in it?  
It would be huge help and would be highly appreciated.  
Warm Regards!

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [May 12, 2020, 8:23pm UTC](https://discourse.threejs.org/t/i-cant-make-dragcontrol-work-at-all-please-help/15137/2 "2020-05-12T20:23:45Z")

</div>

I see two errors in your code:

1. You are importing modules from different hosts. Please never do this. Besides, do not use files from different releases. This is not supported. Do it like so:

```auto
import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.115/build/three.module.js';
import {OrbitControls} from 'https://cdn.jsdelivr.net/npm/three@0.115/examples/jsm/controls/OrbitControls.js';
import {GLTFLoader} from 'https://cdn.jsdelivr.net/npm/three@0.115/examples/jsm/loaders/GLTFLoader.js';
import {DragControls} from "https://cdn.jsdelivr.net/npm/three@0.115/examples/jsm/controls/DragControls.js";

```

1. When importing `DragControls` in this way, you don’t have to use the `THREE` namespace. Create the controls like so:

```auto
const dragControls = new DragControls( objects, camera, renderer.domElement );

```

If you are new to modules, I highly recommend you study how ES6 modules work in order to avoid such confusion. Notice that this specific topic is totally unrelated to `three.js`. Without a basic understanding of JavaScript, you will have these problems with all libraries.

---

<div class="post-metadata">

**Author:** ![I\_am\_FPS\_k](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/i_am_fps_k/32/10674_2.png) [@I\_am\_FPS\_k](https://discourse.threejs.org/u/I_am_FPS_k)\
**Post date:** [May 13, 2020, 4:02pm UTC](https://discourse.threejs.org/t/i-cant-make-dragcontrol-work-at-all-please-help/15137/5 "2020-05-13T16:02:53Z")

</div>

Thank you so much @Mugen87! it’s working now.
