Added the ray hitting/transforming to global coordinates