move out raycaster from main, at last