Ok it works now, thx for telling me to turn off plugins!
I had nothing to do after fixing my issue with dragdetectors and so i made default part with secret drawer inside
2023-10-14 18-30-32|video
oh damn it didnt get preview
how do i make it so that it doesnt do this stuff
Thatās great, @x_maks441 !
You might get better results with preview if you convert it into an animated gif (and make sure itās under 10MB). I always use this site to do the conversions:
@dodleoy if you want to move parallel to the ground plane, but you donāt want to be able to drag it so far, then [1] set the dragDetector.ReferenceInstance to be any other object in the scene. Terrain is fine, but if you want to express the limits relative to, say, the pivot of the floor of a room, then make that floor or other object be your referenceInstance [2] set the DragDetector.MinDragTranslation and MaxDragTranslation so that the max is greater than the min.
Now your object will only drag between the min/max values.
There is no scripting required for this, you can do it all with properties.
For example, if you want to be able to drag the object inside a room thatās 20 x 30 in X and Z, you can place an object or attachment or the roomās pivot in the center of the room; set that object to be the referenceInstance, and then set MinDragTranslation = (-10,0,-15) and the MaxDragTranslation = (10, 0, 15). Since the Y values are equal, you can move it up and down as much as you want. Of course, the default DragStyle is TranslatePlane so your dragger wonāt be lifting the object and in this case, Y is irrelevant. Thereās an example of this if you look at DragDetectors TestWorld 1 #3B: Move in ViewPlane. The balls canāt be dragged above or below a certain height. Or look at DragDetectors TestWorld 2 #5:Slide where the square is kept within the boundaries of a rectangle.
If you want to drag in other planes, you can rotate the ReferenceInstance object and the DragDetector will drag in that objectās new X/Z plane. Or, you can change the DragDetector.Axis which specifies the normal to the plane in which you will drag. For example if DragDetector.Axis is (1,0,0) you will drag in the YZ plane instead of the XZ plane.
Lastly, there are other DragStyle values. TranslateViewPlane will drag parallel to the view plane. And TranslatePlaneOrLine will drag in the plane, but if you press the control key you will drag in the line perpendicular to the plane. And you can swithc back and forth which makes it easy to drag an objects anywhere in the 3D space.
How would I create a crank handle? I have two parts, the rotating cylinder that is connected by HingeConstraint to the wall, then a handle that is another cylinder connected to the aforementioned cylinder by another hinge, this also contains the DragDetector. What settings are needed in order to permit a player to grab the handle and rotate it in a smooth motion? In addition how can I monitor the rotation of the crank in order to do things like open a door depending on how much the handle has been cranked?
@BusDriverAlmonty if you change the dragDetector.DragStyle to RotateAxis, it will rotate about the Y axis of the pivot of the dragDetector.ReferenceInstance.
In your case, Iām not clear why you want two hinges. Iād think you would connect the first cylinder to the wall with a hinge, and then weld the second part to the first so that they rotate together.
Iād set the dragDetector.DragStyle to RotateAxis; and the dragDetector.ReferenceObject to be the Attachment on the wall, which doesnāt change when the hinge rotates and gives you the right spot to twirl around; then. Iād make sure that the dragDetector.Axis is the same as the attachmentās axis that points parallel to that first cylinder, your desired axis of rotation. Easiest way to do this is to select the attachment, select the Translate tool, make sure itās in local mode (command +L toggles between local space and worldspace and you see a little āLā when itās local) and then see which axis points in the direction you want for your axis of rotation (red = x, green = y, blue = z). Set your dragDetector.Axis to match.
Thereās no scripting for any of this; you can do it all with properties.
Once this is all set up, you should be able to watch the dragDetector.DragFrameās orientation and see the values changing to decide when to open the door.
If you get this working, maybe post a video or even a small model so that others can see or try it?
I noticed that the part wonāt move if you move forward, or into the part. Are there other settings that I can enable to make this happen with āTranslateViewPlaneā, or it is only attainable via scripts?
The action is a little strange. Are you using ālift and carryā for this? I would not because that keeps it a constant distance, and you want to be able to push the ball.
And TranslateViewPlane would not allow you to push the ball forwards either.
I would just use TranslatePlane in the ground plane so you can roll it forwards at different angles. (This is what I used for the bowling demo in DragDetectors TestWorld 1)
Or you could use āBestForDeviceā ā this will let VR users move it with 6DOF control; and users with keyboard mouse roll in plane with the extra bonus of being able to lift if they hold the command key.
Oh, no. Iām using a different game for this.
Okay then Iāll need a more thorough description of what you are trying to do, how youāve set things up, and how they are behaving.
https://gyazo.com/309140a7aa29245fe5a4fb7abfdf1e40 The video shows that the object is able to move left and right, and not space out a millions studs away, but you canāt make it move forward and backwards.
The question I asked before was if there was a setting on the drag detector that would go hand in hand to solve this problem.
The only setting I have changed from the default DragDetector on the cube is the DragStyle.
What is the DragStyle that you are using?
As I said earlier, TranslateViewPlane does not have a forward component and is not a good choice here.
Please read this post from earlier today about 8 replies up, linked below, for information about how to move objects so they move in the ground plane, but stay within an area.
The DragStyle Iām using is āTranslateViewPlaneā
Ye and what find you from the tumb and badge I also changed the image from it
Wow! This is quite cool! I think I will use this DragDetector for something in my game!
@PrinceTybalt is it possible to use the drag dector to make a grab toy game like you see in archcades to pick up teddys etc?
How can I limit the total ammount of rotation allowed by a draggable part. I mean in total NOT per drag, since the limits in the detector seem to only apply per drag. Application is a valve that is unanchored and attached via constraint. Another thing that Iāve noticed now is that this also seems to not respect the HingeConstraints āLimitsEnabledā property. Iāve attached a place with afformentioned valve. Since I set it to āPhysicalā if I read the documentation right, it should be respecting constraints attached to the part being manipulated.
DragdetectorValveRepro.rbxl (92.2 KB)