Introducing UIDragDetectors [Studio-only Beta]

You shouldn’t be able to… Does it still appear after you restart studio?

Existing UIDragDetector instances won’t be removed, but you shouldn’t see it when you try to create a new instance.

Creating one through scripts, though, would still work.

Is there an ETA, for when this feature will be public and out of beta?
(I´m currently coding some UI functionality that would benefit from this feature, but idk how long till this feature drops and if its worth using it or waiting a bit)

2 Likes

is there a way to prevent DragEnd being forced when the parent of the UIDragDetectors is changed? I’m trying to make a inventory system but it includes changing the parent of the frames being dragged. (nvm just read a response to someone that had the same problem)

There is not, as a lot of the underlying functionalities depend on the relative positioning and parent properties (Scale for example-- and some of the DragRelativity & DragSpace computations).

Perhaps you could have a different, linked Frame that changes hierarchy during the drag to show visual response, and handle the UI being dragged at the end of the drag only?

1 Like

tried it and works nicely with the way i’m handling my system

1 Like

Is there a way to make the draggable UI object’s position visible to other players?

So, for example, I (Player1) drag an object on my screen (on a SurfaceGui) - it moves to a certain position
And other players can see me dragging this object

Is this possible without invoking Remote Events to fire to the server, everytime the object changes its’ position?

there are values to the drag, you just have to do some coding and math

As UIDragDetector acts client-side only, reflecting the changes server-side would require event processing of some kind.

If the concern is too many events firing, you could perhaps space the event fires to be every X dragContinues, only at the end of a drag, or after it’s moved X units, or some other condition-- but I don’t believe it’s possible to do so without an event.

Calculating how much you need to shift could be done easily with the DragUDim2 value, and if the UI moving on serverside reflecting to the local drag is your concern, doing so with a Custom
ResponseStyle might be a solution, as it doesn’t actually move the UI (only updates the UIDragDetector as if it did). That way, the local UI would be able to reflect the positional changes from serverside property changes, while having the changes be triggered by the UIDragDetector…

1 Like

Are you aware that you can also drag the UI in studio, even if you haven’t selected it (with a dragdetector)?

That would be with the UIEditor plugin, correct?

The only UI-plugin I have installed is Autoscale Lite

I am having a similar issue to this.
If i drag the ui and move my cursor out of the bounds of the UI on a surfacegui, the drag does not end and when I try to drag other detectors it will just break them forever. When i place my cursor back into bounds of the first detector it will keep dragging the ui as if i never let go of my LMB.

I believe a valid solution would be to end the drag the moment the cursor goes out of bounds. Which i am unsure how to do on my own

1 Like

That’s weird, as it should have been an issue that was fixed. Let me file a ticket for this.

I’m assuming this is in VR?

Still not quite sure what you’re referring to in the original comment-- were you talking about the functionality to select the GuiObject, resize them / move them around and such in the Studio?

If so, that’s a different use case-- UIDragDetectors should work in engine and client alike, not just for Studio and editing GuiObjects.

Please correct me if I’m misunderstanding, though

I mean like if you have a UIDragDetector inside of a UI-element, you are able to move the UI without selecting it (when not in test mode, just the normal studio).

Yes, that is intended behavior! You should be able to use the UIDragDetector in edit-mode. It won’t fire any script signals, though.

this is just a custom camera i made, its in pc roblox

Gotcha-- I’ll file a ticket and hopefully we can get around to it soon.

If you disable a UIDragDetector while it’s in dragging state then it breaks the CoreGui on PC making most things unresponsive and it breaks the UIDragDetector itself on mobile

Any ETA on a full release for live games?

1 Like