###前提・実現したいこと
thetaからwi-fiストリーミングをし、そのリアルタイム360度動画をVRで表示できるアプリをUnityで制作しています。
ジャイロ対応するのですが、右をむいたら左を向きます。
しかもやたらと画質が悪く、左右どちらかが妙に拡大されて表示されます。
Unity、theta初心者です、ご回答お願い申し上げます。
###該当のソースコード
using UnityEngine;
using System.Collections;
public class GyroScript : MonoBehaviour
{
Quaternion currentGyro; void Start() { Input.gyro.enabled = true; } void Update() { currentGyro = Input.gyro.attitude; this.transform.localRotation = Quaternion.Euler(90, 90, 0) * (new Quaternion(-currentGyro.x, -currentGyro.y, currentGyro.z, currentGyro.w)); }
}
###試したこと
currentGyroの-の位置を変えたりしましたが、上下反転してしまったりうまくいきません。
あなたの回答
tips
プレビュー