Changed ray back to using a vector for direction