Rotate object based on camera rotation

Im building this game that requires the rotation of an object relative to the camera in 3D space. Essentially, i have an object that is the child of an FPS camera which needs to be rotate in front of the camera acting as a third person character. I am developing in VR so mouseX, MouseY wont work. Help is greatly appreciated!

So far I have come up with this but it doesnt work:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HeadMotion : MonoBehaviour {
     public GameObject headRotationRoot;
     public Quaternion rotationFromTheHead;
     public Transform tempTransform;
     void Start () {
     }
     // Update is called once per frame
     void Update () {
         tempTransform = headRotationRoot.transform;
         tempTransform.localRotation = headRotationRoot.transform.localRotation;
         transform.localRotation = tempTransform.localRotation;
         Debug.Log ("headRotationRoot: " + headRotationRoot.transform.localRotation.x );
         Debug.Log ("tempTransform: " + tempTransform.localRotation.x );
         Debug.Log ("transform: " + transform.rotation.x);
     }
}