Raycaster progress

Working on the raycaster. I think there may be some kind of bug here, not sure...