Add gravity/drop physics to items #15
Loading…
Reference in a new issue
No description provided.
Delete branch "task/14-drop-physics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Items are now
RigidBody2Dinstead of plainNode2D, with a new floor collider (GroundStaticBody2D) so dropped items fall under gravity and settle with a small bounce instead of freezing wherever the mouse released them.Click detection is unchanged (still manual
_unhandled_input+_contains_pointfrom #12) — physics is purely for the fall/settle feel, not a second input path._start_drag()freezes the item (kinematic-style, so direct mouse-follow positioning doesn't fight gravity);_try_snap()keeps it frozen on a successful placement or unfreezes it on a miss so it falls and settles. Items only collide with the floor (layer 2 / mask 1), not each other — that's separate scope.Verified headlessly (physics simulation runs fully without a display, unlike mouse position): gravity pulls an unfrozen item down and it settles on the floor within a few seconds without perpetual jitter; a frozen/dragged item doesn't move despite many physics frames; placing onto the correct stand freezes it permanently; full #3/#4 regression suite still passes.
Closes #14