System using raycasting in 6 directions from cursor

Buggy,
Only works at 90 degree angles of rails