If you have A and G two vectors (2D or 3D) representing points, the path from A to G is G-A. If G is your center of gravity, you have y = (A-G).normalized(). (Doesn't work if A == G, as you'd divide by 0).
In 2D, x is easy, x = y.rotated(-PI/2).
But in 3D, I would use a Transform. First, get your Transform to the wanted orientation, and then use transform.basis.xform(Vector3.LEFT), and similar. (we use xform on the basis to discard any translation on the Transform).