Add rotation to mesh around different pivot points at runtime

For simplicity, say I have a rectangular prism/cube as a pawn with two input actions:

  1. Right Thumbstick Y-Axis “Pitch”: I need to set the pitch of the cube to 45 degrees around pivot point “A” if the axis value is negative but pivot point “B” if it’s positive.

  2. Left Thumbstick X-Axis “Turn”: I need to add a continuous yaw rotation to whichever pivot point above is “active”, or simply add the yaw around the origin of the mesh if the right thumbstick y-axis = 0.