New rayDirection calculation