I’m trying to use the RotateAround, to spin an object around other one. Until HERE, there’s no problem.
The spheres are spinning around the box, but the box isn’t placed in fixed place.
When the place where it’s fixed, rotate, the box follows, but the spheres loses the direction where they should it be spinning.
I thought in use a localPostition to set the axis where the object will be spinning, but i have no idea about how will i do this.
Any kind of help will be welcomed.
Ty all
public GameObject mySun;
public int speed ;
void Update ()
{
transform.RotateAround(mySun.transform.position, Vector3.up, speed * Time.deltaTime);
}