Raycasting implementation attempt 1