It should be live in all games! You simply need to enable the beta feature in Studio to be able to add the DragDetector instance into your places.
Thatās awesome! I recently made this game with my team for a gamejam as well! Reversed Mind - Roblox
It i already live for published games! Since last Tuesday.
Are you having an issue where you donāt see it enabled in your game?
Glad you got it working! When life gives you lemonsā¦ make a Roblox game!
And, smart move to make use of the ray itself. Thatās more efficient than what weāve done prior referring to the humanoid to get a frame of reference. If itās giving you what you need, very nice.
Cool game! I love all the beautiful visual effects and the red-cube-trails when recording. I got through puzzle 1 butā¦ itās a workday I canāt play more right now.
Are there DragDetectors in the later puzzles?
Hi @foodeggs7 I tried looking at your yellow puzzle in the file you sent, but when I hit play the pieces fall.
So you need to weld them together or something.
Is the problem you have is that you canāt drag then when they are welded, so you left them unwelded?
Is that whaāts happening with your fan too?
Well there is a way around this. You can weld the part, but then when you want to drag it, you disable the weld in a dragStart callback and enable it again on dragEnd.
Iāve attached an example world:
It contains a non-anchored blue part welded to an anchored red wall.
There is a prismatic constraint limiting the blue part to only move up and down.
And a spring connected to a little green ball just to show physics is active.
Most important for you isDraggingAWeldedPart.rbxl (57.0 KB)
a script that removes/restores the weld so you can move it, but it wonāt fall down when you are done:
local dragDetector = script.Parent.DragDetector
local weld = nil
dragDetector.DragStart:Connect(function(player, ray, viewFrame, hitFrame, clickedPart)
weld = clickedPart.WeldConstraint
weld.Enabled = false
end)
dragDetector.DragEnd:Connect(function(player, ray, viewFrame, hitFrame, clickedPart)
weld.Enabled = true
end)
I recently deployed DragDetectors to my game and overall the feedback from my players has been very positive. However, Iām running into an interesting bug with DragDetectors affecting some mobile users. This seems to only occur when the part is towards the left of the screen and the DragDetector is not detecting any input from the player.
On PC, hovering over the part allows you to see the cursor for dragging and more importantly it does allow you to actually drag. On mobile the dragging functionality in some cases (even without code behind it) appears to just not detect any dragging input.
All the reports weāve had of DragDetectors being difficult or not detecting input is from mobile users. On PC the behavior is as expected.
External MediaThe lower left section of the screen is reserved for navigation on touch devices.
Initially in our first implementation you could drag there, but then people would get in situations where the couldnāt move the character because the navigation area was completely covered by a DragDetector, which stole the events.
You can check if this is the issue by running the device emulator in studio:
[1] go to the test ribbon
[2] click ādeviceā and then from the pulldown over the center of the game view, pick a touch device like āSamsung Galaxy S7ā
[3] click play
If this is your problem then maybe you can design around it with a visual cue?
If itās something different then maybe we have a bug to fix.
Are you in a situation here where the player cannot walk or navigate? If so it might be interesting to think about a way to override this behavior when navigation is not present; something we donāt currently support
We were planning on doing it, but it hadnt come out of beta yet.
Your response is greatly appreciated and this is definitely the problem. I completely forgot and oversaw the fact that mobile navigation uses that section of the screen. In my implementation the playerās camera is manipulated and the player can not actually move, so perhaps a way to override the navigation there would be useful when using DragDetectors with a locked camera/position.
We will likely have to design around this for now, I think it should be easy for us to just move the camera a bit higher or to the left so that the left section of the screen is not interfering with our DragDetectors. Is this a solution you think is viable for now or was your āvisual cueā suggesting something else? Open to suggestions about how to get around this atm!
Yes, if you can make sure that the DragDetectors you care about are outside that area you should be okay.
Weāll also look into whether thereās a nice way to disable this; but itās not something that would come soon.
I has made it unanchored without welds and made with negatives a hole in the fan and wall but the shaft was not working so I has do it over with anchor the negatives but it only work to the first part in the second part of the shaft union you canāt go further how can I fix that maybe it holes are cant colide and the screws clitch out the wall so how can I fix that but the holes must be cancolide false to work with unanchored screws
And is there a way to use dragdettectors in a tool
How do i add this to the game to pick up logās and parts? Iāve gone on to the world to try it but I cannot seem to get it working.
Are there some good tutorials I can use please?
What would be the script to move it like you have freeform and then dropping down? Iāve got an old ish version of a drag script but struggling to understand the new dragdetectors so i can migrate it to that.
I have already posted the code for my custom drag style function in my post
@MonsterStepDa Iām really curious whether the script @MintSoapBar posted helps you and meets your needs.
Many people will be asking this question, and theirs is the simplest solution Iāve seen so far.
Please report back? It would be great if we had a good, established answer for this question.
@foodeggs7 Iām sorry but Iām having a hard time understanding your issue in the first paragraph.
Can you isolate the issue youāre having into a small set of parts and post that with an explanation of how you expect it to behave?
As for toolsā¦ DragDetectors arenāt really made to work with them. The motion of the tool is governed by its attachment to the hand isnāt it? (I donāt know a lot about tools to be honest).
What do you expect to be able to do with a DragDetector and a tool?
If others reading this also expected to be able to use DragDetectors with tools, Iād love to hear your use cases as well.
I believe it should work now! Let us know if there are any issues.
good news and bad news.
good news first, one of the issues I was having is now fixed! before when I dragged the object that had limits on translation, the limits would stay in the position it was grabbed at (limits wouldnāt follow the referenceinstance) this doesnāt happen anymore and the limits follow the referenceinstance.
now the bad news is that when I back away or get close to the dragged object, it stays at the same position without accounting for the limits.
itās better but still doesnāt fully work for me.
please let me know if Iām doing anything wrong.
(object in the video has max set to X: 8, Y: 8, Z: 8 and minimum set to whatever distance the player was from the part when it was grabbed on each axis)
EDIT: did a bit of testing and another strange issue happens when grabbing the object from a closer distance. itāll just fly to a far away corner from my player. (I know itās happening cause of the max translation but itās strange how it doesnāt happen when Iām further away)
here I set the reference instance to the players head cause setting it to the humanoid wasnāt doing anything.
Ok
I have made a shaft with a fan by this fan you must drag screws out the wall
So I made with unions and negative a shaft but you cant walk in it I think the negatives not anchored
So I tried it again and now part 1 of the shaft work but part 2 not
I think it so in the fan so the screws clitch out the wall because it union negative not correct set
But the screws must unanchored and the holes must cancolide false
I will make a X bow so you drag a arrow and shoot it
But maybe that Bleu springs