HI,
I have object that’s rotates around
how do I make when another object is on this object
the other object will rotate too.
I thought to make the object child of the object that rotates
but is their an easier way?
thanks in advance.
HI,
I have object that’s rotates around
how do I make when another object is on this object
the other object will rotate too.
I thought to make the object child of the object that rotates
but is their an easier way?
thanks in advance.
Transform masterObject; //or make this public and set it in the inspector
void Start()
{
masterObject = GameObject.Find("blabla").GetComponent<Transform>(); // set it to public and then you don't need this
}
void Update()
{
//this may be the wrong rotation. it could be localRotaion, or eulerAngle.....
transform.rotation = masterObject.rotation;
}