Character won't rotate right in faux gravity enviroment.

So I’ve made a planet (sphere) and dropped a body (capsule) with rigidbody near it. I managed to recreate a gravity effect via simple vector mathematics and it worked! But I’m at the stage where I’m trying to figure out how to move the capsule around the sphere. My first problem that I ran into - is it’s rotation. I managed to do it right when I tried making an FPS controller with default gravity (aka on a simple plane) but everything’s acting strange with faux gravity. I try to rotate it (the whole capsule with the camera) along the Y axis - it snaps back to it’s original rotation, I try to rotate the camera along the X axis - it works but it ignores the clamp. Can someone explain what might be the problem? Here are the scripts I used (both are on the capsule):

Gravity.cs:

[RequireComponent(typeof(Rigidbody))]
public class Gravity : MonoBehaviour
{
    public float gravity = 10.0f;
    private Transform planetT;

    private void Awake()
    {
        planetT = GameObject.FindGameObjectWithTag("Planet").GetComponent<Transform>();
    }

    private void FixedUpdate()
    {
        Vector3 center = (transform.position - planetT.position).normalized;
        GetComponent<Rigidbody>().AddForce(center * gravity);
        transform.rotation = Quaternion.FromToRotation(Vector3.up, center);
        GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotation;
        GetComponent<Rigidbody>().useGravity = false;
    }
}

FirstPersonController.cs:

public class FirstPersonController : MonoBehaviour {

public float mouseSensitivity = 5.0f;
Transform cameraT;

private void Awake()
{
    cameraT = gameObject.GetComponent<Transform>().GetChild(0).GetComponent<Transform>();
}

private void Update()
{
    float clampedMouseX = Mathf.Clamp(-Input.GetAxis("Mouse Y") * mouseSensitivity, -90, 90);

    transform.Rotate(Vector3.up * Input.GetAxis("Mouse X") * mouseSensitivity);
    cameraT.localRotation *= Quaternion.Euler(clampedMouseX, 0.0f, 0.0f);
}

}

You need to use relative rotations. You can’t just use Euler when you don’t know what the local Y axis is aligned to. Use the Quaternion.AngleAxis with your transform’s axes. That should get you in the right direction.