Problem about rotatearound smoothly

if (Input.GetKeyDown(KeyCode.Q))
        {
            view.RotateAround(playerTrans.position, Vector3.up, 90);
        }

Hi guys, I just want to rotate my camera view around the player by pressing Key Q once. The code did work but it will immediately rotate the view(i.e. not smooth) What should I add if I want a smooth rotate by pressing key Q once?

Rotate continuosly while key is held (GetKey(…)), at some speed in degrees per second, multiplied by deltaTime.

if(Input.GetKey(KeyCode.Q))
{
    view.RotateAround(playerTrans.position, Vector3.up, speedInDegreesPerSecond * Time.deltaTime);
}

Maybe set the desired rotation with your keydown event, and outside of that ‘condition’ you could use: Unity - Scripting API: Quaternion.RotateTowards

If you had anywhere in your code to alter (revert) the rotation, just set the target rotation once again and let the code run to reach said rotation.

Actually, in my case I want my key pressed once and the camera will rotate smoothly to target position which is 90 degrees around the player. So it will not be holding the key. Just one press

You have several options.

You could start a coroutine that tweens to the target rot.

You could set a variable of the new target rot, and in Update always be lerping towards it.

Many other options.

It all depends on how you want it to look.