Introducing UIDragDetectors [Studio-only Beta]

I had this issue too, but you can bypass it by detecting input in drag start then setting a conditional in dragEnd with tick to determine if a player just clicked your icon or attempted to drag it.

1 Like

Interactive UI with UIDragDetectors will lose its functionality when the UIDragDetector is enabled-- disabling the UIDragDetector will re-enable functionality for those GuiObjects (Ex: TextButton, ImageButton, TextBox, ScrollingFrame, etc).

As @IcyWorldz mentioned, there may be workarounds that doesnā€™t go through this behavior, but that is the default state of things.

1 Like

Im useing uiscale to scale this map up with a dragdetector to move it around, but it seems to get harder to move it as it gets bigger keep in mind its on scale mode since offset dosent look right


image

Ooh, a new flight sim game in development! Iā€™ll have to give it a shot when itā€™s out :smiley:

As for the issue, do you have any observations of the AbsolutePosition value of the frame on the drags?

If moving the map with the mouse moving halfway across the screen in both unzoomed and zoomed conditions donā€™t result in equivalent absolutePosition change amounts, that would indicate that thereā€™s an issue.

yeah lol, im working on a flight sim with the whole world sounds complicated but i got it down, ill try it out later

Yeah it you can barely move it 2 pixels in 2000x zoom which is alot but i need it to see small locations

look at the absolute size and position on the bottom right, tell me if theres anything wrong

Oh jeez, i just figured it out turns out the map was parents to a frame and the frame was getting scaled up with a uiscale not the button, i just moved the uiscale to the button and it works lol

nvm it does not work it breaks everything, and the zoom dosent work since its not centering idk what to do, my only option is to use custom scale on the uidragdetector but at the point it easier to code my own dragging system which i tried and did not work

Why do sliders inside my plugin donā€™t work when I have UI stuff selected in explorer? I wasted so much time wondering why it was not working :pensive:

Im pretty sure ui drag detectors only work in-game

just find one of those custom slider modules

They work in plugins too. I found this random bug and you can see that it works in the video.

Interesting, Iā€™ll try to emulate this and see whatā€™s going on. Thank you for the report!

Thank you so much, it seems to work fine when the uiscale is parented to the button but it breaks everything else so if you need any help emulating it im open for the next 7 hours

also couldnt i just like multiply how much the map moves depending on the zoom

I believe thatā€™s because it has the UIEditor plugin active.

Unfortunately, the drag behavior is not usable when you have a GuiObject selected as it interferes with UIEditorā€™s inherent dragging / repositioning behavior. Itā€™s the one plugin (Along with the selection tools) that overrides UIDragDetector Usage.

You probably could with Constraint Functions (Multiply computed drag vectors by however much you want and return it, with the appropriate settings).

If you have a .rbxm youā€™re willing to share, that would be the easiest-- else, Iā€™ll try to make one that zooms in and has its size change.

I wonā€™t be able to get to it today, but I am continuously working on bugfixes and hope to have most of them knocked out by the end of the year.

i can share the rbxm it has alot of other things for my flight sim, im trusting you lol do you want me to send it in discord or just roblox devforum dm

or i can just make a simplified version ill do that

i sent it its a simplified version

1 Like