DragDetectors [Beta]

Regarding ScreenGUI & DragDetectors:
But hey seeing all this demand makes me think there should be a drive for supply!

We are keeping track of all your suggestions and this is certainly in the lead.

15 Likes

I just got off of work and saw this post. It made me happy,. but wonder if VR was left out yet again.

Then I looked at the replies and saw 6DOF with VR was possible.

Now I’m just wondering when I get to make Multiplayer Tiltbrush.

This is amazing!!!

4 Likes

This is interesting.

While I wasn’t surprised when I read the title of this thread, I certainly was when reading it - I assumed this would be some sort of raw input getting method for dragging alone, so to see that it’s actually some full physics item is really interesting.

The way it’s set up to be so physics-interactive, I’m honestly surprised it’s not called a DragConstraint, as it feels like it’d fit into the constraint system. There isn’t really anything else like this/related to this, it’s so unique.

This will, overall, be VERY useful to a game I was planning, where infact sliding and such would have been the main game mechanic!

6 Likes

The video you are mentioning wasn’t showing any bugs, but instabilities with making the system using “physics” & apply weld & other constraints to it

I had found a weird behavior but couldn’t catch in on record, and I don’t quite know the repro steps either. I will try to reproduce it and post something if I find it back !

Thank you very much for your explanations, and your investment in the project. 10/10, what a great job ! :star_struck:

And to answer your question, I can’t figure out yet if I would prefer EVERY unanchored parts to be automatically anchored… I guess it could be done using the associated events and scripts?
Either way I personally won’t use this feature with a model containing anchored & unanchored parts (normally).


I am still making a little poll to gather a few opinions:

"it will temporarily anchor that part and move the pivot of the model instead. If there are other parts that are not anchored though, they may not move along with the parent pivot. We don’t search for ALL non-anchored children and temporarily anchor them. If you are following me so far…

is anchoring all the non-anchored descendants while moving the model pivot something you would want in geometric mode?"

When using Geometric mode, would you like to…
  • Get all the parts in a model anchored when one of its descendants is being moved?
  • ONLY let the part being moved be anchored, but let the rest as it is?
  • I don’t have any opinion about that

0 voters

Thanks for voting, your opinion is valuable insight !

EDIT: DragDetectors [Beta] - #90 by PrinceTybalt

1 Like

I am quite confused about this message… Let’s setup a test:

I use 2 distinct models each containing 2 ANCHORED parts:

image

The “Translation” is the moving test. It uses:

  • TranslateViewPlane in Geometric (as shown below)
  • The “COLORWHEEL” part in “TRANSLATION” model is set as the PrimaryPart

The “Rotation” is the rotational test. It uses:

  • RotateTrackball in Geometric (as shown below)
  • The “COLORWHEEL” part in “ROTATION” model is set as the PrimaryPart

Reminder: ALL parts are anchored.


What it does

What I would love to have

Basically, the littler parts FOLLOW the bigger one (as if they were welded to the bigger one we move). It’d help a lot to treat model movements instead of having to use constraints (as I was explaining earlier). If it is possible, it would be wonderful !

2 Likes

This is great, I’m surprised to see so many great updates in the last few days!
Any idea of when they will be shipped to Games?

2 Likes

This feels like a usage where it’d be nice to parent the DragDetector to the model, not the part - That way if there are multiple anchored parts it will move correctly.
But I’m guessing that’s not how it works currently, right? I haven’t tested it yet.

Definitely agree, the ability to apply the movement to an entire anchored model would be a useful addition.

3 Likes

@Varonex_0 regarding your poll: The current behavior is useful,. imagine you want to carry an unanchored chandelier and have all the crystals wave and clink about, regardless of what part you pick it up by… So we would not replace it. It’s a question of whether we give a second option to freeze everything at once.

2 Likes

i think this is a very good update however i would like to know if there is a way to add a limit to how far you can drag the part. im not sure if the axis/ movement limits is a way to limit your drag. Even after i read the documentation i didnt understand its purpose.

3 Likes

Hi @Varonex_0. The DragDetector moves only its parent, whether that is a part or a model.
So in each case, your DragDetector is going to move the part called COLORWHEEL and nothing else.
If you want to move the whole model, you move the DragDetector up one level and it will edit the pivots of the TRANSLATION and ROTATION models instead of the pivots of the COLORWHEEL parts.

As an experiment, keep the ones you have and add a second one a level up. Now, if you drag the COLORWHEEL you rotate it alone, and if you drag the small piece, you drag both together.

There is some crazy sublety here because if you set the DragDetector’s referenceFrame to be the parent model, you can actually build nested hierarchies of rotations roo. Check out the “NestedRotations” example in “DragDetector TestWorld 2”

3 Likes

@Dede_4242 We want some soak time to get your feedback. Once we exit beta and ship in games, we can’t change the API. So if you think things should change, now is the time to tell us!

1 Like

See my response to @Varonex_0. You can put the DragDetector below a model. If all parts are anchored, it’s very straightforward because we edit the parent pivot and all will move together.

If the parts below the model are not anchored, it’s more complicated, With ReponseStyle = Physical, it will move the part you click and constraints/welds will determine which other parts in that model come with it. If the ResponseStyle = Geometric, it will temporarily anchor that part (only that part) and move the pivot of the model. So the part you click and any anchored parts in the model will move together; other unanchored parts my be affected by constraints or remain if not constrained to the parts of the model that are moving.

3 Likes

You can check out the MinAngle, MaxAngle, MinTranslation, MaxTranslation properties to limit how far the part can move during a drag! For more advanced limitations, you can use constraint functions.

I believe that in Test World 2, CircleConstraintAnchored/Unanchored, TwoConstraintsAnchored/Unanchored and AngleMinMax will be an example on how to use them.

Also reference this comment.

4 Likes

@Bennydoes_stuff and @DeFactoCepti –
Yes, MinAngle, MaxAngle, MinTranslation and MaxTranslation will let you limit motion without scripting.
Checkout the ParticleMinMaxSlider in “DragDetector TestWorld 2” for example., It keeps the planar translation within a rectangle.

But if what you want is “never be able to move it farther than 200 units from where you originally clicked it” that’s a different idea. You’d need to register a constraint function. It receives the proposed motion, and you could clamp the translational aspect to your maximum distance; and return that clamped value.

And as @DeFactoCepti says, the examples he points you to will help you constrain motion to lie within a circle; a good place to start if you want to pattern from something. You can also check out the tutorial page linked in the announcement; it has a constraint example that snaps to a relative grid.

3 Likes

For some reason the DragDetector doesn’t work for me at all. I have the beta feature enabled and it shows the icon when I hover over stuff, but holding click doesn’t do anything.

1 Like

@MichaelTheCat9 did you try closing and restarting studio?

1 Like

I’ve tried everything, I’ve tried restarting studio, I’ve tried disabling and then re-enabling the beta feature, nothing works.

1 Like

how did you make the slingshot?

2 Likes

@Bennydoes_stuff you can grab the slingshot and inspect it yourself. You can find it in “DragDetectors TestWorld 1” or look for the model in the Toolbox by filtering for creator PrinceTybalt.

But essentially:
The yellow part is not anchored. It is connected to the sled by a spring. And the skinny struts on the side and top hold the yellow part in place (I could have used constraints but find it cool that geometry will hold it in the line just like when you build real things; though if you pull hard enough it can sproing out of place and break. This wouldn’t happen if I’d additionally added a prismatic constraint).
The DragDetector on the yellow part uses ResponseStyle = Geometric so that when you pull, the part stays exactly with the cursor. I also set the MinDragTranslation and MaxDragTranslation so you can’t pull the yellow part down through the floor. Then you just set a little red discus on top and everything just works. A script reloads the disc when you let go.

4 Likes

this is awesome!!! would it be possible for this to work with gui or for there to be a gui equivalent?

2 Likes