Please tell me how can I use DragControls more correctly so that it works. For example, I want to move the object where I want when I press a certain key.
by user 1101049107931480066
Please tell me how can I use DragControls more correctly so that it works. For example, I want to move the object where I want when I press a certain key.
by user 1101049107931480066
You mean you only want drag controls to be enabled when a certain key is held (e.g. ‘d’) ?
I wanted to be able to move an object by touching the screen
by user 1101049107931480066
by user 1101049107931480066
I would like to know how to work with addDragEventListener
by user 1101049107931480066
Can you describe more what you want to achieve? DragControls literally lets you drag objects around by touching the screen
such a result three.js examples
by user 1101049107931480066
but I don’t know how to properly implement addDragEventListener
by user 1101049107931480066
Have you added the DragControl script to your objects? That does that
I’m not sure I understand the question yet
yes, i added a script, but it doesn’t work. I think that you need to write some kind of custom script to make it work
by user 1101049107931480066
Now I’ll show you how I do it
by user 1101049107931480066
by user 1101049107931480066
@herbst🌵
by user 1101049107931480066
@Flora
by user 1101049107931480066
@krempel
by user 1101049107931480066
Please, definitely don’t ping the team. That’s not a polite behavior and it won’t result in anything.
Also not everybody on the team is technical or to be here for support Please respect that.
I think it requires to have ObjectRaycaster
component somewhere in the scene. Can you try adding that?
@prokharkulak
object raycaset camera ?
by user 1101049107931480066
Not sure if i follow. Could you add more words to your sentence?
Are you asking where to put it? Anywhere is fine i think, good place is the MyScene object