I have a character completely made out of parts, with rigid bodies and joints. I am trying to assign the rotation of the LowerTorso to the rotation of the Camera. It is not working. What am I doing wrong?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LowerTorsoRotation : MonoBehaviour {
public GameObject Camera;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.rotation = Quaternion.Euler(transform.rotation.x,Camera.transform.rotation.y,transform.rotation.z);
}
}