A framework which comes with prepared scenes and classes to kickstart your card game, as well as a powerful scripting engine to use to provide full rules enforcement.
Currently I'm using a warp_mouse() workaround to avoid the card teleporting when first grabbing onto it to move around, I warp the mouse to the card location (which effectively moves it to the card's local Vector2(0,0)).
This has two issues:
It sometimes confuses the player who finds their mouse cursor warped.
You're still getting a cross-cursor on the top-left of the card, which I often confuse as a targeting reticle. However the truth is that cards find the container to drop into based on their Area2D colisions. So if you try to target the deck using the top right part of the card (where the cross mouse cursor will be while dragging), the card ends up inside the hand, because its Area2D collides with both deck and hand. and hand has a lower node index than the deck and so the automation prioritizes it for a move_to() target.
I think the best solution would be if the mouse cursor was hidden, then it's intuitively more natural to understand where you want to drop the card. I did try with MOUSE_MODE_HIDDEN, but I could not combine it with MOUSE_MODE_CONFINED which is way more imporant (as unclicking the mouse outside the game can break dragging and automation which relies in mouse inputs).
If the mouse cannot be made invisible, another solution would be to keep the dragged card always on the same relative spot on the mouse cursor as in the moment it was picked up. This would mean offsetting the card global placement when dragged to match the local placement of the cursor inside the card. You might still get some jitter/teleportation when picking up a card from a position next to the board edge, (especiually in the hand), but it shouldn't be too bad.
Currently I'm using a warp_mouse() workaround to avoid the card teleporting when first grabbing onto it to move around, I warp the mouse to the card location (which effectively moves it to the card's local Vector2(0,0)).
This has two issues:
I think the best solution would be if the mouse cursor was hidden, then it's intuitively more natural to understand where you want to drop the card. I did try with MOUSE_MODE_HIDDEN, but I could not combine it with MOUSE_MODE_CONFINED which is way more imporant (as unclicking the mouse outside the game can break dragging and automation which relies in mouse inputs).
Maybe a solution like suggested here: https://godotengine.org/qa/60675/make-cursor-hidden-in-mouse_mode_confined could work, to temporary replace the mouse cursor with a transparent sprite?
If the mouse cannot be made invisible, another solution would be to keep the dragged card always on the same relative spot on the mouse cursor as in the moment it was picked up. This would mean offsetting the card global placement when dragged to match the local placement of the cursor inside the card. You might still get some jitter/teleportation when picking up a card from a position next to the board edge, (especiually in the hand), but it shouldn't be too bad.