cnagy42 cnagy42 loading
Hi,
I have Tetris like shaped blocks the player can drag onto a grid. (When you first click/tap the block, it moves upward so that a finger is not obscuring its location.)

When the first square of the block (currently labelled “1” is inside the grid, I have the block snap to the closest grid square so that everything is aligned. I maintain this snapping feature as the player keeps moving the mouse. (Goal: prevent the player from mistakenly letting go of the block on the wrong square).

Dragging the block left to right and snapping to the grid is working well (not perfect, but decent).
Dragging the block up and down is NOT working as smoothly and I can't figure out why.
If there is a better way to do this, I'm all ears. I wonder if my approach is overkill

If anyone wants to take a look, it would be greatly appreciated.
The relevant code is in the “Blocks5-01” sprite, and you only need to refer to the “When this sprite is clicked” section in the top left.
Thank you
Project link