Introducing UIDragDetectors [Studio-only Beta]

Hey, @DeFactoCepti!

Love this new feature, I’m definitely going to continue my project’s development with this instead of sticking with custom-coded sliders.

However, as for current bugs, are you guys aware of this by any chance? Just posting it incase it can help speed up the release.

Intended behaviour (in studio):

Actual behaviour (in game):


How to replicate: just copy the frame from the test place and place it in a new game’s StarterGui

And then it also doesn’t seem to work ideally on mobile - it just shifts the entire box space outside of where it’s actually meant to be:

Also, another thing to note: I tried to make my own draggable slider from scratch using the UIDragDetector, but even if I copy all of the settings from the one in the test place, it still has an entirely different behaviour in a bad way (dragging off the slider even tho it reached the maximum with the dragger’s AnchorPoints set to 0.5,0.5 and you can’t drag it back in, etc.)

1 Like

We are aware of some issues on mobile, and hope to have it fixed soon-- though those are some bugs that we found earlier and fixed. I’m surprised to see that it’s happening again.

We’ll note this and file a ticket to work on it!

2 Likes

The API you propose (“dragDetector.DragStyleFunction = function…”) is basically equivalent. There’s no particularly good reason to offer why it was done the other way in DragDetectors in the first place, and nobody mentioned it back when they came out. At this point though, it would be nice to keep UIDragDetectors and DragDetectors consistent.

3 Likes

Yep, that’s exactly what happened. Thank you for looking into it!

I was really waiting for a client beta but i feel like this still has its issues lol (This only happens while a game is not running);
image

This is why beta testing is needed guys.

3 Likes

Just to clarify, does this ever happen during playtest? Or just in the Studio Edit Mode?

2 Likes

Only seemed to happen in the edit mode

This part wasn’t that well worded because i didn’t know what to call it

2 Likes

I cannot wait for this to become available in regular Roblox experiences, although I also do wonder whether a possible future feature could be to define a ‘draggable area’, so to speak. For example, on computers, you can drag around various windows by holding down the top of said window. The current UI drag detectors make the entirety of a frame draggable, although I wonder if it would soon be possible to make it so you can drag the frame but only by holding a certain part of the frame as this would be a massive aid to UI design and UI interactivity.

1 Like

This is awesome, thank you. But is there a way to check if a UI has touched a different UI element using this? So like a UI.Touched or something similar.

1 Like

I have a problem.
This is a video about a window. The window drag using the UI “Drag” Detector is supposed to follow the cursor’s position. Yet, it stops after moving the cursor too fast and follows as the cursor is moved.


The Bounding UI is on this TextLabel. The problem is that it shows the cursor on the entire Frame instead of the bounding UI, this will confuse the player into thinking that it drags from everywhere.
image
Here are the settings.
image
Uhh that’s it :coefficients:

2 Likes

I just tested this out for a similar UI as well and faced the same problem: this definitely needs to be addressed.

1 Like

I have a problem, and that is that I made its movement to be in scale, so the problem is that I put minimum (-.5,-.5) and maximum (.5,.5) both in scale, I am omitting Offset. Now, the problem is the precision of these when reaching their limit, although it is not exceeded, it does not allow us to reach the real value, that is, sometimes it reaches -0.45 and so on. I write from my cell phone, that’s why I can’t show images.

This is definitely something that was felt during development, and will be considered!

Unfortunately, there’s no straight way to do this other than compare each UI’s min and max corners, i’m afraid :frowning:

The window not following the cursor is interesting-- would you be able to provide a .rbxm that I could test out internally to try and figure this out?

As for the cursor, there are some cursor fixes that will be applied this week-- please let me know if the issue persists.

Do you have a .rbxm I could test out locally to try and reproduce this issue?

Bummer, thanks for the reply though. Hopefully it gets suggested later on!

1 Like

The fine-tuning of scale positions is being worked on. There’s a bug with the MinMax translation limits at the moment, and hopefully, it’s mitigated somewhat after a fix.

1 Like

Maybe you could use GetGuiObjectsAtPosition over a corner of a UI to see if there are any other UI elements at that position?

1 Like

I can do that, but it only works if the frame is over the frame. I think it’ll be cool if it worked while the frame is touching the edge.

2 Likes