4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Oculus Interaction SDKを使ってみました

Last updated at Posted at 2022-11-18

Oculus Interaction SDKを使う設定を備忘録としてまとめておきます。

Oculus Integration V46の設定となります。
また、Unityプロジェクト作成の詳細は、本題ではないので省きます。
XR Plug-in Managementがインストール済みで、Quest向けの設定をしてあることが前提となります

Oculus Integrationの導入

  1. Oculus Integrationのインポート
    全てのパッケージをインポートします
    1-OculusIntegration.png
    2-OculusIntegration.png
  2. インポート中の選択肢
    3-OculusIntegration.png
    4-OculusIntegration.png
    5-OculusIntegration.png
    6-OculusIntegration.png
    7-OculusIntegration.png
  3. OculusProjectConfigのHandTrackingSupportをControllers And Handsに変更します
    8-OculusIntegration.png

シーンの準備

掴む側

  1. Main Cameraを削除して、OVRCameraRigを追加します
    8-Scene.png
  2. OVRHandPrefabをLeftHandAnchorとRightHandAnchorに配置します9-Scene.png
  3. RightHandAnchorに配置したOVRHandPrefabを右手用に修正します
    10-Scene.png
  4. LeftHandAnchorとRightHandAnchorに追加したOVRHandPrefabから以下のコンポーネントを削除します
    • OVRSkeletonRenderer
    • OVRMesh
    • OVRMeshRenderer
    • SkinnedMeshRenderer
      11-Scene.png
  5. OVRControllerPrefabをLeftControllerAnchorとRightControllerAnchorに配置します
    22-Scene.png
  6. 追加したOVRControllerPrefabのControllerの左右をそれぞれL Touch、R Touchに設定します
    23-Scene.png
  7. OVRInteractionを追加します12-Scene.png
  8. OVRInteractionにOVRCameraRigを設定します
    13-Scene.png

手の設定

  1. OVRInteractionにOVRHandsを追加します
    14-Scene.png
  2. OVRHandsのLeftHand、RightHandの配下にあるHandFeatuersにOVRInteractionを設定します
    15-Scene.png
  3. OVRHandsのLeftHand、RightHandの配下にあるOVRHandDataSourceにOVRInteractionとOVRHmdを設定します
    16-Scene.png
  4. OVRHandsのLeftHand、RightHandの配下にあるHandInteractorsLeft、HandInteractorsRightにHandGrabInteractorを追加します
    17-Scene.png
  5. OVRHandsのLeftHand、RightHandの配下にあるHandGrabInteractorにそれぞれ、LeftHand、RightHandを設定します
    18-Scene.png
  6. OVRHandsのLeftHand、RightHandの配下にあるHandInteractorsLeft、HandInteractorsRightにそれぞれのHandGrabInteractorを設定します
    19-Scene.png

コントローラーの設定

  1. OVRInteractionにOVRControllersを追加します
    20-Scene.png
  2. OVRControllersのLeftController、RightControllerの配下にあるOVRControllerDataSourceにOVRInteractionとOVRHmdを設定します
    21-Scene.png
  3. OVRControllersのLeftController、RightControllerの配下にあるControllerInteractorsにControllerGrabInteractorを追加します
    24-Scene.png
  4. OVRControllersのLeftController、RightControllerの配下にあるControllerGrabInteractorにそれぞれ、LeftController、RightControllerを設定します
    25-Scene.png
  5. OVRControllersのLeftController、RightControllerの配下にあるControllerInteractorsにそれぞれのControllerGrabInteractorを設定します
    26-Scene.png

掴まれる側

  1. 空のオブジェクトを作成し、以下のコンポーネントをアタッチします
    • Grabbable
    • Rigidbody
    • PhysicsGrabbable
      30-Scene.png
  2. 空のオブジェクトにCylinderを追加します
    31-Scene.png
  3. CylinderにHandGrabInteractableをアタッチします
    32-Scene.png

これで、掴むことができるようになりました。

4
2
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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?