Rotate the Camera with the Character on Dynamic Gravity

Hi, I’m trying to create a world which is not a flat plane on the X and Y axis, and so it will have dynamic gravity. I have been capable of rotating the Character around a Sphere (for testing) by creating a C++ Class of UFloatingPawnMovement:

void UDirectionalGravityMovement::TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) {
	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
	
	if (!PawnOwner) return;

	// Apply directional gravity
	static FTransform LastTransf = FTransform(FVector(0.0f, 0.0f, 1.0f).ToOrientationQuat());

	const FVector Loc = PawnOwner->GetActorLocation(), Up = Loc.GetUnsafeNormal();
	const FTransform Transf = FTransform(Up.ToOrientationQuat());
	
	FQuat Rot = PawnOwner->GetActorRotation().Quaternion();
	Rot = LastTransf.InverseTransformRotation(Rot); // Transform relative to old plane
	Rot = Transf.TransformRotation(Rot); // Transform absolute to new plane
	LastTransf = Transf; // Set new old transform

	PawnOwner->SetActorLocation(Loc - Up * GRAVITY_ACC * DeltaTime, true);
	PawnOwner->SetActorRotation(Rot);

};

(It’s heavily simplified for now, gravity is merely a velocity and the world is just a sphere with a certain radius.)

The problem that I’m facing is that whenever I rotate the Character by Pitch and Roll the Camera resists to such rotations. Not only that but clamps the angles like as if the Character was walking on an X and Y plane. Would it be possible to tweak some attributes to keep the exact same functionality of the Camera and the Spring, while being able to make them relative to the Character’s Pitch and Roll (for example)?

So, what I mean with this is that, when walking up and down and rotating with the world, the Camera rotates with the Character only on the Pitch And Roll. And keeping the angles relative to the new found rotation.

I guess one solution might be to apply Character rotation after Spring and Camera updates, but this would mess up entirely the collision of such.

It would be desirable to not have to change the entire calculations for the Spring Camera.

Thanks in advance.