public boolean validRay(RayIntersect intersect){
        if(intersect == null || Double.isNaN(intersect.getX()) || Double.isNaN(intersect.getZ()) ||  intersect.getDistance() == 0){
            return false;
        }
        return true;
    }