1
0

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 3 years have passed since last update.

Oculus Interaction SDKを使ってみました ~ Poke編 ~

Posted at

前回「 Oculus Interaction SDKを使ってみました」では、Oculus Interaction SDKを利用して、物を掴めるようにするところまでまとめました。

今回は、Poke編ということで、ボタン押すなどに利用できるインタラクションの設定についてまとめます。

前回の設定が行われている前提の手順となります

シーンの準備

つつく側

手の設定

  1. OVRHandsのLeftHand、RightHandの配下にあるHandInteractorsLeft、HandInteractorsRightにHandPokeInteractorを追加します
    1-poke.png
  2. OVRHandsのLeftHand、RightHandの配下にあるHandPokeInteractorにそれぞれ、LeftHand、RightHandを設定します
    2-poke.png
  3. OVRHandsのLeftHand、RightHandの配下にあるHandInteractorsLeft、HandInteractorsRightにそれぞれのHandPokeInteractorを設定します
    3-poke.png

コントローラーの設定

  1. OVRControllersのLeftController、RightControllerの配下にあるControllerInteractorsにControllerPokeInteractorを追加します
    4-poke.png
    OVRControllersのLeftController、RightControllerの配下にあるControllerPokeInteractorにそれぞれ、LeftController、RightControllerを設定します
    5-poke.png
  2. OVRControllersのLeftController、RightControllerの配下にあるControllerInteractorsにそれぞれのControllerPokeInteractorを設定します
    6-poke.png

つつかれる側

  1. 空のオブジェクトを作成し、その下にボタンの土台としてCubeを追加します
    7-poke.png
  2. PokeInteractableを空のオブジェクトの下に追加します
    8-poke.png
  3. PokeInteractableのTransformを調整し、ボタンのように押せる準備をします9-poke.png
  4. ボタンとしてSphereをPokeInteractable配下のButtonVisualに追加し、大きさ、位置を調整します
    10-poke.png
    11-poke.png
  5. これで、ボタンを押すインタラクションを行うことができます
    12-poke.png
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?