c# – Unity3D how to make an object start moving in an arc or circle using radius?

Unity3D, C#

I would like to know how to move the object smoothly using radius, I want the object to start moving in a circle from the transform.position, like this:sample of what I want to do, and only using C# script, what I can think of is using transform like below.

timeCounter += Time.deltaTime * speed;
float x = Mathf.Cos(timeCounter) * width;
float z = Mathf.Sin(timeCounter) * height;
transform.position = new Vector3(x, 0, z);

I have tried this forum.unity.com/threads/how-to-make-an-object-move-in-a-circular-motion-at-constant-speed.526107/ but it is not what I wanted, the answer of mine (youtu.be/V2A-0yOUNwc) make the object quickly move to the right and it uses the middle location as the center then starts moving from the right, and I can’t control which angle it will start.

Read more here: Source link