While dragging an Attachment when its parent is moving the Attachment Position/Orientation accumulates its movement as well. This makes it very difficult to drag an attachment on a slowly moving part.
The bug happens in any place when a dragged Attachment’s parent object has moved and the Attachment is being dragged.
The bug has likely been happening since the beta release for Lua Draggers.
To reproduce the bug, hit Play on an empty Baseplate and attempt to drag an attachment under the Character, for example, RightShoulderRigAttachment and let go when the dragger is back at its original location before the drag (this is easy to do for rotation). The Position and Orientation will have accumulated the parent object’s movement in relation to the attachment.
What is the use case of dragging attachments in a running game? I don’t doubt that there is one but I need to know in what context this problem comes up to know how to best resolve it.
Would anchoring any parts which those dragged attachments are relative to for the duration of the drag potentially be a better solution than what the old draggers did?
Well, the way I encountered this was through testing some avatar code I’m working on. I’m basically using the avatar’s rig attachments to control the character’s limbs as they’re perfect for it. I have definitely dragged Attachments at runtime prior and I don’t remember having issues, and I tend to do this a lot when working with constraints. I do think that Anchoring the parts would be a good solution… I believe this might’ve been how the old dragger handled it if I’m not mistaken.
The old draggers apply their movement in individual steps on each mouse movement, vs the new ones apply their mouse movement as a bulk movement relative to the original object position (which is why they have less floating point error than the old ones).
That means that the old draggers naturally take the movement of the part into account because they’re doing each frame’s movement relative to the position at the start of that frame.
Anchoring seems like a better behavior to me, since if you’re trying to edit the thing, you don’t want it moving around underneath you.