LoginSignup
2
5

MetaQuest3とUnityでMRを始めよう

Last updated at Posted at 2024-04-25

手順

  1. 3Dでプロジェクトを作る
  2. Edit → Project Setting → XR Plugin Management → install
  3. PCとAndroidのOculusにチェック
  4. Oculus Integrationをインストール → UnityAppを開く
  5. Oculus Integrationをimport → 全ての項目にYes
  6. Oculus → Tool → Project Setup Tool → PCとAndroidをAll fix & All Apply
  7. File → Build Settings → AndroidにSwitch Platform

カメラの設定

  1. MainCameraをDelete
  2. Assetの検索 → OVRCameraRigの2個目をHierarchyにドロップ

コントローラー

  1. Assetの検索 → OVRControllerPrefab をOVRCameraRigの子要素Left,RightどちらとものHandAnchor内のControllerAnchorにドロップ
  2. OVRControllerPrefab内のControllerをそれぞれL Touch, R Touchに
  3. Assetの検索 → OVRHandPrefab をOVRCameraRigの子要素Left,RightどちらとものHandAnchorにドロップ
  4. RightのOVRHandPrefabのHandType,SkeletonType,MeshTypeをHandLeftからHandRightに

パススルー

  1. Hierarchy → Create Empty → Add Component → OVRPassthroughLayer
  2. OVRCameraRigの子要素CenterEyeAnchorのClearFlagsをSkyBoxからSolidColorにし,BackGroundを真っ黒に
  3. OVRCameraRigのOVRManagerのTarget DevicesのQuest3にチェック
  4. 同じくOVRManagerのHandTrackingSupportをControllersOnlyからControllers And Handsに
  5. 同じくOVRManagerのPassthroughSupportをNoneからSupportedにし,EnablePasstjroughにチェック

起動

  1. SceneInBuildにSampleSceneを追加する
  2. BuildSettingからDevicesをOculusにして,Build&Run
2
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
5