fixing ray cast direction