Adding matrix function to match rotation order used by objects.