Hi, I have scene in blender with few objects. Every object has the default needle DragControls. Now, in my own script, I want to get the object I am currently dragging (if I am dragging some object). I went through documentation and questions here but couldnt find anything. Did I just miss it, or I need to make my own script ?
Hi, can you clarify a bit what your goal is?
I have a 3D model, that has dragable parts, and some snappoints for the parts. I project the positions of every snappoint, so i get their screen position, so when my mouse comes close enough, the model part will snap to the point. Until now I did it using distanceTo for the 3D part, but it is quite bothersome that way, to get the 3D part to the snappoint radius . Imagine like a 3D puzzle.
Ah ok so you’d need e.g. static events for DragStart/DragEnd or a static list of currently active DragControls or something like that?
Yes, the static list of currently active DragControls would be best. Maybe even a dictionary, where key is a player (when networking is enabled) and value is the active DragControl, so you can see who is moving what object, while in a room using networking.
I forgot to add this, there is something similar to what i want, static DragControls.HasAnySelected, but that just returns a bool and I can’t get the object that DragControls has selected.
Hi @marcel, please, any update on this topic ?
We’ll add a DragControls.CurrentlySelected array to the next version
Thanks.
This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.