How to make an object rotate around a point relative to the camera?

So I currently have an object - an open cardboard box. It rotates around a pivot, right in the middle of the box or so. It rotates with the mouse, and it does so nicely for the most part. But I notice that if I, say, rotate it so it’s askew and then pull it to the left, it rotates around its center axis - not “left” as the player understands it. I want to change it so that it rotates relative to the camera, as opposed to itself.

Here’s the code for moving the box.

using UnityEngine;
using System.Collections;

public class MoveBox : MonoBehaviour {
   
    public float speed;

    void OnMouseDrag()
    {
        float h = Input.GetAxis("Mouse X");
        float v = Input.GetAxis("Mouse Y");

        Transform pivotPoint = transform.Find("Pivot");

        Vector3 vector = new Vector3(v, -h, 0.0f);

        float mag = vector.magnitude; //to make it move relative to the amount the mouse moves
        transform.RotateAround(pivotPoint.position, vector, mag * speed * Time.deltaTime);
    }

    void Update ()
    {
       
        if (Input.GetKeyDown("r")) { //Reset the box
            transform.position = new Vector3(-4.8f,1.33f,-3.6f);
            transform.rotation = Quaternion.identity;
        }
    }

}

Help for how to solve this issue would be greatly appreciated.

One way I have solved this in the past is to create a GameObject, say “box_arm” located at the same position as the camera and them make the object with MoveBox a child of box_arm. You can then set the position of the box relative to box arm by adjusting the transform of the box (which will now be relative to box_arm).

Rotations applied to the box_arm object will rotate the box a fixed distance away, relative to the camera. Rotations of the box will rotate the box around its location.