OculusGo centerEyeAnchor.rotationの値の取得実証実験をしてみた

チュートリアル概要
OculusGoのヘッドセットの角度をセンシングしているセンサーのひとつcenterEyeAnchorの値を読み取ってみた。どこか特定の向きに向いているときのコード実装に有益かなと思います^^
結論
結構ざっくりですが、以下のようになっています。
上を見る
定位置

下を見る
定位置

右を見る
定位置

左を見る
定位置

右に傾く
定位置

左に傾く
定位置

検証方法
UI経由でテキストに表示させました。
UIのTextコンポーネントに追加したY座標の取得コード(x座標取得コードはほぼ一緒なので割愛)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
public class Showx : MonoBehaviour {
private Text targetText;
[SerializeField] private Transform _centerEyeAnchor = null; //OVRCameraRig/CenterEyeAnchorをD&D配置
// Use this for initialization
void Start () {
this.targetText = this.GetComponent<Text>();
}
// Update is called once per frame
void Update () {
this.targetText.text = String.Format("r : {0}", _centerEyeAnchor.rotation);
}
}
CenterEyeAnchorの配置のUnityEditorの指定メモです

検証結果
そのほか参考になる資料
詳しいです。重宝します
kan-kikuchi.hatenablog.com
Quartanion
spi8823.hatenablog.com
Text表示用の資料です。一応のっけときます
qiita.com