Woah I like that
That’s really cool system that you made (when Drag detector was a beta ver!)
Keep up the good work :>
This is a very amazing update. These types of updates should be more frequent.
Hasn’t this existed for months? What happened?
It was released a while ago in beta (as are most new features) to allow them to address some crucial bugs and gather feedback prior to it’s official release. This is it’s official release announcement and you can find the beta release announcement here.
They’re for teleporting around the map; you should be able to click on them
Is there any way in the drag detector to set a ‘snap’ to the movement.
Such as you start dragging an object, but the object only moves once the drag has gone 1 stud, so it snaps.
I think this would be really helpful if it was a built in thing. Snap to rotation would also be nice.
Bruh. This would have saved me so much time. I literally found a Grab System that I had issues with getting set up. But now it will be 10x easier.
Does this run faster than a custom dragging script?
I have my own object dragging script that is fairly optimized, and I want to know if I should use this new feature instead. I want my game to be as optimized as possible.
I don’t know why but, when i put copy of draggable part from game or toolbox, it doesn’t work.
I like how this is basically a reference to someone talking about the lumber tycoon dragging thing in the beta post.
Anyways, glad to see that this has released! This will be very fun to experiment with.
I found that the client script got Enum.RaycastFilterType.Blacklist
and it says ‘Member “Blacklist” is deprecated’
I guess its what is not letting me to pickup that part???
I also tried changing to to .exclude
and .include
but it didn’t help
.
.
.
Edit: i checked Lift And Carry - Roblox in studio and it doesn’t work too, im now sure that it doesn’t work outside of demo game.
@PeZsmistic thanks for posting this. I probably won’t fold this into the posted example, to keep it isolated and simple. It will be better if we just fix the bug you found so that people don’t have to work around it. We’re going to get on that as quickly as we can.
I’m curious about this comment.
“-- Release the ownership here so there’s no funny delays if you’re yeeting stuff”
Can you explain the problem you’ve solved and how/why it works?
@hschu_hschu That’s great! I love the bit with the digital clock in perspective starting at 0:35 (even though that part has nothing to do with Dragging. )
@Sho_Takahashi That’s very strange. Maybe try uninstalling and re-installing Studio?
Is anybody else experiencing this problem? Do you still see DragDetectors listed in the available betas? It should have been removed from that list and you should be able to add a DragDetector with the + button in the Explorer
@0Tenth Exactly. I got tired of running around from demo to demo so I started sticking these radio towers everywhere with a ClickDetector and a little script. Click them and your character teleports to that location.
Im experiencing this problem, i can add dragdetector with + button in explorer.
This is way better than the custom one I made a couple of months ago!
Definitely gonna use these for future projects!
SICK UPDATE, Can’t wait for more updates such as this!!
In the example it was setting the ownership to the player and then forgetting about it. I didn’t feel like this was good so I just made sure when the player drags a new thing, it unsets ownership on the previous thing so the server can take over when appropriate. I just delay doing this until you grab something new so when you release, the server doesn’t take it immediately and add weird latency to the physics response. I’m still looking over security and other details in my adjusted implementation so I’m not sure if releasing ownership explicitly is necessary yet, or if I need to be more gentle about it when multiple players are wrestling with something. E.g. I probably don’t want to unset it if the owner is not the given player.
Hi @SelDraken
DragDetectors let you constrain motion any way you want, but it does require scripting.
There are so many ways to constrain things that we chose not build a particular constraint method into DragDetectors. Instead, we give you a lua hook to do whatever you want.
There are several examples in DragDetectors TestWorld 2 that you can dowload and copy/change.
The clip below shows some of them. You’ll want to explore the full scripts but the most relevant bit for snaping to a world grid is this:
local startPartPosition = nil
dragDetector.DragStart:Connect(function(player)
startPartPosition = movablePart.Position
end)
dragDetector:AddConstraintFunction(2, function(proposedMotion)
return constraintExampleUtils.roundToWorldGrid(proposedMotion, startPartPosition)
end)
And then in a separate module, you’ll find:
function ConstraintExampleUtils.roundToWorldGrid(proposedMotion, startPartPosition)
if startPartPosition == nil then
return proposedMotion
end
local proposedPartPosition = startPartPosition + proposedMotion.Position
local newPartPosition = Vector3.new(math.round(proposedPartPosition.x), math.round(proposedPartPosition.y), math.round(proposedPartPosition.z))
return proposedMotion.Rotation + (newPartPosition - startPartPosition)
end