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!
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 !
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
0voters
Thanks for voting, your opinion is valuable insight !
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 !
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.
@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.
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.
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”
@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!
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.
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.
@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.
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.
@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.