Moving Position Overrides RotateAround() ?

When I use these together at the same time, the position overwrites the rotation from happening and the objects stand still statically.

They both work separately as intended but when combining them, the rotation stops working.
This shows that what each line does, rotates or moves it.

It should rotate in a circle while moving towards the center or away from the center at the same time.

/* Rotate */
BodyParts[i].transform.RotateAround
(playerObject.transform.position, rotation, speed * Time.deltaTime);

/* Move */
BodyParts[i].transform.position += moveDirection * currentSpeed * Time.deltaTime;

Don’t use RotateAround. Just make these objects children of a central empty pivot object and rotate it. RotateAround is going to accumulate error over time which will become significant eventually.
So:

  • for rotation, simply rotate the parent.

  • For the in and out motion, simply change the object’s local positon.

They don’t override but you do have to keep updating the moveDirection as the direction of the center constantly changes. Although from the video I’m guessing that your moveDirection or currentSpeed is set to zero before the rotating starts.

You should show the full Update().

Spawn is just invisible marker points around the circle where the objects should move depending on radius.

  private void CircleAround()
    {
        for (int i = 0; i < BodyParts.Count; i++)
        {
            /* Distance around the circle */
            var radians = 2 * Mathf.PI / BodyParts.Count * i;

            /* Get the vector direction */
            var vertical = Mathf.Sin(radians);
            var horizontal = Mathf.Cos(radians);

            var spawnDir = new Vector3(horizontal, 0, vertical);

            /* Get the spawn position */
            var spawnPos = playerObject.transform.position + spawnDir * circleRadius; // Radius is just the distance away from the point

            Vector3 moveDirection = spawnPos - BodyParts[i].transform.position;

            /* Rotate */
            BodyParts[i].transform.RotateAround(playerObject.transform.position, rotation, speed * Time.deltaTime);

            /* Move */
            BodyParts[i].transform.position += moveDirection * lerpSpeedCircle * Time.deltaTime;

            /* Rotate the objects to face towards player */
            BodyParts[i].transform.LookAt(playerObject.transform.position);
        }
    }

Added the empty parent and it rotates fine but it still doesn’t mix well with the movement code.

Your script looks a little overly complicated for what it seems to be trying to do.

Create a new scene and add the script below to a sphere. It may give you some ideas on how to simplify things.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RotateAround : MonoBehaviour
{
    public GameObject playerObject;
    public List<GameObject> BodyParts=new List<GameObject>();
    float lerpSpeedCircle=2; // positive value for move inwards, negative for outwards
    float speed=100;

    void Start()
    {
        playerObject=this.gameObject;
        int count=8;
        int radius=10;
        Vector3 offset=Vector3.forward*radius;
        for (int i=0;i<count;i++)
        {
            GameObject obj=GameObject.CreatePrimitive(PrimitiveType.Cube);
            obj.transform.position=playerObject.transform.position+offset;
            obj.transform.LookAt(playerObject.transform.position);
            offset=Quaternion.Euler(0,360/count,0)*offset;
            BodyParts.Add(obj);
        }
    }

    void Update()
    {
        CircleAround();
    }

    private void CircleAround()
    {
        for (int i = 0; i < BodyParts.Count; i++)
        {
            /* Rotate */
            BodyParts[i].transform.RotateAround(playerObject.transform.position, Vector3.up, speed * Time.deltaTime);

            /* Move */
            Vector3 moveDirection = (playerObject.transform.position - BodyParts[i].transform.position).normalized;
            BodyParts[i].transform.position += moveDirection * lerpSpeedCircle * Time.deltaTime;
        }
    }

}

It will if you use localPosition.