Changing the rotation of an orbiting object

I’ve currently got code that’s rotating an object around the other object. So, Object A is rotating around Object B. By default, Object A is always facing Object B as it rotates, which I’m trying to change. I need Object A to be facing forward as it rotates, essentially always showing it’s side to Object B.

transform.position = PlayerShip.transform.position + (transform.position - PlayerShip.transform.position).normalized * 10f;
transform.RotateAround(PlayerShip.transform.position, Vector3.up, 180 * (Time.deltaTime));// / 20));

Is rotating the object properly, but what is the correct formula in conjunction with transform.LookAt to keep Object A always facing forward?

Found the solution for anyone who might care:

var lookDir = Vector3.Cross(transform.position - PlayerShip.transform.position, Vector3.up);
transform.rotation = Quaternion.LookRotation(lookDir * -1, Vector3.up);

You can make it a child of an empty gameobject having the exact same position. Place your script on the parent. Now the child can be rotated to whichever direction you want. Setting it to +/-90 degrees around Y axis will set its side towards the PlayerShip. If initially parent gameobject isn’t aligned properly, you can even add a line to the script:
This will align parent’s positive Z axis towards the PlayerShip. Make sure the child is facing towards the positive X axis direction of the parent.