Ray-sphere intersection algorithm complete but the vector projection function needs adjusting