初心者用でも理解できるように学ぶ、Blender2.8/ゲーム開発/アニメ/漫画/趣味のなんでもサイト

ナマケモノにも分かるまなぶろぐ

Unity2019 VRoid Studio 動画説明

【初心者用 動画】簡単UnityによるVR作成‼

更新日:

「Unity VR」を利用せず、もう一つの方法として、「Dive Unity Plugin Package 2.1.5」を利用してVRを作成する方法の説明動画です。「Dive Unity Plugin Package 2.1.5」を利用しても簡単に作成できます。

【動画】

■おすすめVRゴーグル

オキュラス Oculus Quest 2 64GB オールインワンVRヘッドセット[納期未定 ご用意出来次第の発送]

価格:37,180円
(2020/9/23 18:16時点)
感想(0件)

オキュラス 【納期未定 入荷次第順次出荷】Oculus Quest 2 256GB オールインワンVRヘッドセット

価格:49,280円
(2020/9/23 18:17時点)
感想(0件)

「Dive_Camera」にジャイロスクリプトを追加

下記コードを「Dive_Camera」に追加します。
※名前は「vrcamera」で作成しましたが、任意となっています。
---------------------------------------------------

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class vrcamera : 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));
	}
}

「NO GYRO!」エラーが表示される対応

「no gyro please use other phone for proper head tracking」の表示された場合、ジャイロセンサーがないのでエラーが表示される?原因は確認していませんが、表示させない対応として「OpenDiveSensor」スプリクトの下記部分を削除するとコメントアウトすると表示しなくなります。

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
void OnGUI()
    {
       if(mbShowErrorMessage){
         if(GUI.Button(new Rect(0, 0, Screen.width, Screen.height), "button"))
           mbShowErrorMessage = false;

        if(NoGyroTexture != null){
            int liHeight = (int)(Screen.height * 0.9);
            GUI.DrawTexture(new Rect((Screen.width - liHeight) / 2,(Screen.height - liHeight) / 2, liHeight,
            liHeight), NoGyroTexture, ScaleMode.StretchToFill, true, 0); }
      }
}
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

参考サイト:https://freesworder.net/dive-camera-error/


-Unity2019, VRoid Studio, 動画説明

Copyright© ナマケモノにも分かるまなぶろぐ , 2024 All Rights Reserved Powered by STINGER.