raycasting smooth version | ScratchStats