Hey. i want to copy the rotation of an object (master) i thought it would work like this:
using UnityEngine;
using System.Collections;
public class copyrotation_x : MonoBehaviour {
public GameObject master;
void Update () {
transform.rotation = Quaternion.Euler(transform.rotation.x, master.transform.rotation.y, transform.rotation.x);
}
}
but somehow it doesent copy the rotation? could you tell me why?
thanks!