UNSTABLE. Finished implementing raycasting. Still need to test more I think.