DragDetectors [Beta]

if you set up the hinge, you can then add dragDetectors to the two parts that contain the attachments. If you set the DragStyle to dragPlane, you’ll be able to drag the parts in the plane and the hinge will work.

If you want the dragdetector to only rotate around the hinge, then set the referenceInstance to be the attachment, the DragStyle to be RotateAxis, and the Axis to match the X-axis of your attachment. That should work

3 Likes

quick question when will the release come

2 Likes

Thanks @Razorter.
Looking at the code, your behavior makes sense.
We check ‘enabled’ before SENDING the event, but the dragDetector PERFORMING the drag does not check ‘enabled’ and you are right, it should.

I’ll file a bug, this should be easy to fix.

3 Likes

Update: There was an issue with last week’s release on certain platforms (not dragDetectors, something else) so I couldn’t enable DragDetectors in all games.

Look for another post from me this afternoon.

1 Like

Man i wish drag detectors were real

5 Likes

DragDetectors are now live in all games!
You no longer need to request for us to enable it for you.
Please post here if you have any issues!

So, while DragDetectors are still technically in beta, you can consider them a full feature when used in games. We are going to watch for new bugs and if all goes well, we will come out of beta in a couple of weeks and DragDetectors will be part of studio for all.

I also want to give you all a summary of [a] what we’ve fixed and [b] some features we hope to add in the coming months (no guarantees here, but we want to be open with you).

You will notice that many of these bugs and plans are things that YOU reported and requested from us. YOU all have been absolutely amazing through this beta period. DragDetectors are way better because of you, and all the people who use them in the future will have you to thank for finding problems early.

Here are some key bugs you reported that we’ve fixed during beta:

  • correct behavior to cancel a drag on respawn, disable, destroy leaveGame, show menu, pick up tool)
  • axis/orientation now replicating and saving correctly
  • scriptable dragStyle called on dragStart as well as dragContinue
  • dragDetector no longer registers extra touch events on tap
  • camera scroll wheel now works even when dragging
  • in geometric mode, we anchor all parts when moving, not just the clicked one
  • scriptable and 6DOF dragStyles now properly handle rotation for non-anchored objects
  • several issues in Team Create and with undo/redo
  • plus a bunch of things behind the scenes that your comments and test cases influenced us to do.

And here are some features we’d like to add (no promises!) based on your feedback:

  • Security Control: a property named PermissionPolicy with 3 values: Nobody, Everybody, or Scripted. If scripted, you may register a method dragDetector:SetScriptedPermissionCheck(function(player, part) that returns true if the player may drag the part, false otherwise.
  • Better Physics Integration:
    *. runLocally should automatically get network ownership for non-anchored objects they drag
    *. add new Collision response style. This will collide anchored objects and allow a way to move non-anchored objects geometrically, but with collisions
    *. throw non-anchored objects on release even in geometric mode
  • Screen Gui & Viewport Frame
    *. ScreenGui/SurfaceGUI: we know you miss ‘draggable’ on 2DUI elements. We want to make it so that if you put a DragDetector below ScreenGui object like a button or text label, then you can drag it, complete with all the callbacks and API; you just won’t be able to bring it out of the plane.
    *. ViewportFrame/WorldModels - we hope to make it so that DragDetectors work in this context just like they do in the main view.
9 Likes

Wish granted!

… unless you mean in real life. Unfortunately, we don’t know how to wield the force :sob:

6 Likes

Thank you oh my godd i was waiting for this!!!

4 Likes

@foodeggs7 has been really helpful during this beta. They’ve reported and helped us find real bugs we needed to fix, and helped us understand the kind of problems people run into when they first use DragDetectors.

Please don’t go!

3 Likes

hello im a tad confused so if people dont have the beta feature turned on, will these work or not

1 Like

It’s confusing. I’ll try to break it down:

DragDetectors work everywhere, for everyone, when you publish them in your game.
You can consider it a full feature of your game that won’t go away.

The only thing that’s still in beta is creating them in studio. People who are not in the beta don’t see DragDetectors in studio and won’t be adding to the set of published games with DragDetectors.


Why are we doing this? To be careful as we make the feature more accessible. So we’re going to watch for a week, and see if any of you report problems in your games. If you find new usability issues, we’ll fix them before exiting the beta and calling it done.

3 Likes

I made a short video showing how to build a sliding door with DragDetectors.
No scripting, 3 minutes!
Probably basic for those of you following here, especially @YasuYoshida, but it also shows how to add the sliding constraint that is required.

8 Likes

Edit I would it for an tool but not working but how can I drag welded parts

how can i let welded parts drag an part before it not work becouse that block the drag detector so i tried it on this way but if you hold you can pick the balk out the puzzle the shape is like a H

2 Likes

It’s a little hard for me to understand what’s wrong. It seems like you’d like all those parts to slide physicallly and nicely, but they are getting stuck.

One thing I would check is that all the attachments for the constraints are nicely aligned and not maybe pushing one object a little to the side relative to the other one.

Also, if you want to post a piece of the game as an rblx file I can look at it and try to figure out if the problem is yours, or with DragDetectors.

If you are using welds to hold things in place when you’re not dragging, then you might need to [a] disable the weld during a dragStart callback, and then [b] enable it again on mouseUp.

1 Like

I can sent you tomorrow a file but I would use this for an tool but I think not it works in an tool and the puzzle is failed but I can try do it and then it above but then must it not go out

1 Like

Well, lets see if we can figure out what is wrong.
I’ll take a look when you send me your file.

2 Likes

I sent it here and dragdettectors not working in tools I need weapons for the game I started made with the game jam do you remember (I’m now busy with the story for it and will made a hal with fences what you must pick up but first pick things out ) but can dragdettectors work in tools I will made a X bow

Ok I have now made this fan it’s so player must walk through the air things by open the fan here but it must be unanchored to work but I can’t weld it how can I let’s it work by playing it Falls out

Look you must open it to go where the bacon stay but by running it falls it made with union and negative if you seen you must drag the Screws out the Schedule fan thing whatever it’s named

2 Likes

I love this feature but is there a way I can limit the distance between the object being dragged and the player? when I walk toward or away from the object it always stays in the same X and Z position. the result I want is the object staying at a certain distance at all times. (similarly to lumber tycoon 2’s dragging system)

6 Likes

Sorry to go off-topic, but that boid simulation is incredible!

1 Like

I stole it! I wanted some boids and wondered… did somebody already do this in roblox so I don’t need to code it again?
And the answer was yes, there was an awesome, nicely configurable plugin (I think) that inserts the boids system but I can’t find it anymore and I forgot where I found it.
The top-level script says:
@ee0w wrote it and they thank Sebastian Lague for inspiration.
@ee0w if you see this, thanks very much, and if you have a good way for others to use your code, let us know.

But Projectile Madness is open for you to download and play with. Look for “BoidGroup” which contains my slightly edited version of the original.

Also the other stuff in Projectile Madness is pretty cool. It was a gamejam project done with friends here at Roblox HQ. The awesome catapult with spring control was done by @itsfrank17

Projectile Madness

7 Likes