Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     material     = GetComponent <Renderer>().material;
     defaultColor = material.color;
     SetGazedAt(false);
     nxrHead = NxrViewer.Instance.GetHead();
     nxrHead.SetTrackPosition(true);
 }
Ejemplo n.º 2
0
        // Update is called once per frame
        void Update()
        {
            NxrHead head = NxrViewer.Instance.GetHead();

            if (head != null)
            {
                PositionText.text = "Pos:" + Math.Round(head.transform.position.x, 2) + "," +
                                    Math.Round(head.transform.position.y, 2) + "," +
                                    Math.Round(head.transform.position.z, 2);
                RotationText.text = "Rot:" + Math.Round(head.transform.eulerAngles.x, 2) + "," +
                                    Math.Round(head.transform.eulerAngles.y, 2) + "," +
                                    Math.Round(head.transform.eulerAngles.z, 2);
            }
        }