Fixed the rotation so that it resets the transformation matrix when
detecting which shape was hit