line only into blocks

when update the current position, draw the line only if I am into a block, otherwise don't draw anything