Dragdetectors break anchored assemblies when using a physical dragger on anchored parts

The dragdetectors will completely break assemblies with anchored parts welded to eachother when runlocally is enabled.

dragdetectors anchor bug.rbxl (91.3 KB)

Expected behavior

any anchored part which the player does not network own to not be draggable automatically to prevent desyncing physics assemblies for when the unanchor again or stay anchored in general.

@rickje139 if a Part is anchored and you drag it with a DragDetector, the CFrame is edited directly and physics is not really obeyed, and the weld is broken.
For Anchored parts, Physical DragStyle is really the same as Geometric.

If you want physics and constraints to be obeyed when you drag an object, you need that object to not be anchored. If, in your example, you set all the parts to be non-anchored, and set all the dragdetectors to runLocally = false, then you’ll see that the whole aircraft gets dragged about together, with physics, and the welds remain intact.

If you want this to work with runLocally, you will additionally need to request network ownership of the object you are dragging. See this example for how it’s done with a combination of player script, client script, and RemoteEvent:
Lift-And-Carry Physical

Note that this last requirement of requesting network ownership when running locally will go away relatively soon. We are working on making that happen automatically.

4 Likes

I am already doing that but the issue is that i have to check thousands of parts every frame to see if they’re somehow connected to an anchored part or not and enable and disable the dragdetectors depending on it.

This is really expensive to do and is a lot of trouble to go through to use this feature.

you’ve asked for something to be done to “any anchored part which the player does not network own.”
But there’s no notion of network ownership for a part that is anchored, only for parts that are not anchored.

May I ask, what is your high-level objective here? What do you want to happen or not happen in this game?

3 Likes

I dont want assemblies to break whenever multiple anchored parts are detected and i want the dragdetectors to respect welds even whenever the assembly is made up out of anchored parts and drag the entire anchored assembly.

@rickje139
I can see trying to implement something whereby we move the anchored part and all other anchored parts that can be reached by welds the same amount. This was not the original intent for DragDetectors but we could augment/modify.

But I’d like to talk through this some more:

[1] What if the assembly is also welded to the baseplate? What would you like to have happen here?
[2] What if the welded assembly is connected by a constraint to something else, like a chain hanging off the back or a spinning weather vane atop a house? I assume you’d want those to remain connected and react?
[3] What about collisions? currently if you move an anchored part, collisions are ignored because when you edit a CFrame you’re not working within the full physics system. We have plans to add a “Collision” reponse style in which collisions are simulated by doing shapecasts so we know when to stop; we could presumably do this for the full assembly
[5] As you can see from the line of questioning, unless an object is non-anchored, trying to move it is kind of cheating the physics system and so making it behave as if it’s not cheating the system is tricky. So this is not a change that can be made quickly. But we can put it in the mix with the other enhancements we are trying to provide.

1 Like

[1] A blacklist could be introduced to blacklist parts you dont want to drag or just a whitelist of parts to allow to be dragged when anchored, for an example:
all connected parts parented to folder workspace.aircrafts.player1aircraft are allowed to be dragged.

[2] Yes they should remain connected but if its connected via a constraint like the ropeconstraint, it should only move the connected end while keeping everything intact.
It should prioritize physics where possible over tricks and only do the calculations on the anchored assembly.

[3] I did not know about anchored parts ignoring collisions.
i’d love to see this feature to use together with multiple anchored parts

[5] I think something like an ignore anchored parts switch would definitely help so anchored parts are not draggable.
I will create a custom workaround for this issue soon by changing the maxtorque and doing a lot of checks to prevent anchored parts from being dragged, but the easier option would be to have a switch to disable anchored parts which i would still switch over to instead of my system due to possible glitches and performance issues with custom checks.