Creating a Matrix4x4 from an Object's Transform

Hello. I am trying to move and rotate objects based on the position and rotation of the camera. For instance, if the camera is rotated 45 degrees to the left around its forward vector, any objects that rotate along the x or y axis should do so around this new 45 degree angle.

I was hoping there was a way to make a new matrix by passing in an objects transform, and then rotate another object using that matrix.

Not sure the best way to do this with Unity.

You probably want the quaternion rather than the matrix. The matrix would have position and scaling included. But you can pull the rotation quaternion right from the transform and multiply it with any coordinates your need rotated.