Offsetting Character Controller during Platform Rotation

Hi there,

I’ve encountered an issue with the rotation of my player character while on a platform that is rotating. Instead of parenting my player, I obtain the change in position of the platform and apply that to my player which works great. The issue that I am having trouble with is that when the platform rotates, I can apply the rotation to my player but the player will still gradually move away from the center of the platform. I understand that I need to obtain the change in position based on the players distance from the center of the platform, but I am having trouble figuring out how to do so and have not found any posts regarding this specific issue. Does anyone have any ideas as to how to make this work?

I believe the shifting is caused by the character not rotating at the same pivot as the platform.

Maybe try offsetting the player’s position to match the platform pivot/position then rotate, then offset back to original distance?

Edited:
This seems to work

        _matchTransform.Rotate(Vector3.up, speed * Time.deltaTime);
        transform.RotateAround(_matchTransform.position, Vector3.up, speed * Time.deltaTime);