First version of raycasting working