With a DragDetector’s ReferenceInstance set to an Attachment, observing the DragFrame specifically via a constraint function shows that it is no longer relative to the ReferenceFrame, and instead expresses movement relative to where the current drag starts.
To be more specific, I have not observed this issue with the actual DragFrame property when it is not being affected by a constraint function (e.g. if a constraint function is not returning anything, or none exist.) The problem is only encountered when checking the CFrame value passed to constraint functions, as mentioned before. As far as I understand, and as per the documentation says, this value should follow the rules that DragFrame does, and remain relative to the ReferenceFrame.
A place file setup to exhibit the issue is here.
Do the following to see the issue:
- Drag the yellow part somewhere away from the purple part, then let go to end the drag.
- Start dragging the yellow part again.
- Observe that the printed CFrame value begins at 0, implying the ReferenceFrame (in this case, derived from the Attachment inside the purple part) to be exactly where the dragged assembly is, which is obviously not the case.
Additionally, here is a video demoing that exact place file:
System Information:
AMD Ryzen 7 5700G
32.0 GB of memory
NVIDIA GeForce RTX 3060 Ti
Windows 10 22H2