Technically already made a thread on this but is this draggable instance intended to end up very slightly offset from it’s container for no apparent reason? (The object is dead-center on start)
Do you have a model you can share? There was an issue with insets that should have been fixed, but this may be a new one.
(+ Devices used if possible!)
Which object are you talking about? I’m not sure which one is being depicted
I have a uidragdetector hooked up to an imagelabel, placed in a bounding frame with a scale response style
Can’t tell if it being able to “overshoot” is intentional or not
So, I did some more researching into it and it did only happen with few select devices, I went through all devices through the device emulator and the problem occurred with:
iPhone XR
iPhone X
Samsung AS1
Xiaomi Redmi Note 9
iPhone 14 Pro
Here is the ScreenGui Model
SliderModel.rbxm (4.2 KB)
If you could share the rbxm with me, I can test it out to try and see what’s happening!
Thank you for the report-- I’ll check it out.
I’ve trimmed the UI down to the (almost) bare minimum for reproducing the problem, and made the bounding box visible (and green) to visualize a bit better
SliderIssue.rbxl (53.6 KB)
(Example image of issue)
Thank you-- I’ll check it out.
Here’s my idea (probably better written this time), within a bounding box, the slider will have its percentage value defined by its distance to the bounding box, this value can also be changed to directly change the position as a scale as well. This can be useful for a audio player or such.
Is there a way to “force” the drag detector to start dragging? Not entirely sure how to explain it, but here is my current scripted behavior from before this feature existed:
Notice how you can also click and hold the background of the slider to drag the scrubber.
How would I go about making this with UIDragDetectors?
for some reason i can’t test UiDragDetectors i have enabale the beta setting UiDectector but is seem to not work
when i say it dont work is when im playing as client inside roblox studio
Great feature-- probably saved me a good number of headaches.
It would be more convenient, though, if you could trigger the drag detector with different inputs rather than being limited to the left mouse button alone.
It’s not enabled on all clients at the moment. It will be in the near future!
Hmm, you definitely could move it to your mouse but initiating a drag wouldn’t be possible without another click for sure.
I guess a hack could be having the entire sliding bar be the UIDragDetector with a custom response, have the bar move to the appropriate position on dragStart, and hook up logic to dragContinue to move the sliding bar based off of the drag vectors?
Can’t really think of a different way at the moment.
Seems to work:
The only problem now is that it does not work well with keyboard navigation and gamepad selection. Dragging the actual scrubber works fine, but dragging the background has some weird behavior when switching directions. Would somehow need to figure out how to disable the drag detector on the background for keyboard and gamepad navigation, but not for mouse/touch/gamepad virtual cursor. Any suggestions? It doesnt seem that simple to differentiate them.
You’re right, the current system for gamepad / keyboard navigation drag won’t really support that workaround, now that I think about it…
How navigation drag essentially works is that it detects a direction, and based off of the SelectionModeDragSpeed, it sets the target location as a point located a little bit away from the UI’s center. If you hold the button, it extends in that direction further-- if you change directions, it jumps back to the center + computed offset.
There’s a lot of limitations to how navigation mode drag works, and this is definitely an example of it. I can’t really think of a way off the top of my head, other than maybe having to use a constraint function such that if the drag is being done under the navigation mode, the point of drag is augmented to mimic a drag translation from the center of the slider, not the background bar.
There were discussions about how to deal with the navigation drag, and this was the best general-case scenario we could come up with, unfortunately.
Important Update:
PC, Mac, Console and Mobile clients will have UIDragDetectors enabled at somepoint today, likely around 3-4PM Pacific Time!
EDIT: Will be Friday morning.
Note that VR clients will not have this enabled until next week’s patch is rolled out to devices, as there is a critical bug that prevents UIDragDetectors from functioning. A fix has been applied already for next week’s release, but it takes some time to be rolled out to devices.
ah thats great, i havent been following UIDragDetector news lately so im not sure if its added already, but making it so it can snap would be really cool i think