Skip to content

zabaglione/DetectSwipe_SteamVR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Detect Swipe for Steam VR(Unity)

準備

  1. Steam VRをインポート https://www.assetstore.unity3d.com/jp/#!/content/32647
  2. 本パッケージをインポート
  3. Asstes/SteamVR/Prefabs/[CameraRig]をSceneにD&D
  4. SwipeしたいコントローラーのGameObject(Scene/[CameraRig]/Controller (left)または[CameraRig]/Controller (right))にDetectSwipe_SteamVR/Scripts/ViveController.csをアタッチ

使い方

以下のusing ディレクティブを追加。

using zabaglione.vive;

Swipe検出時のコールバックを登録

void Start () {
    ViveController vc = GetComponent<ViveController>();
    vc.OnSwipe += OnSwipe;
}

Swipe検出後の処理

void OnSwipe(ViveController.SwipeDirection dir) {
}

使用例はDetectSwipe_SteamVR/Samples/sampleのシーンファイルを開き、Scene/[CameraRig]/Controller (leftにアタッチしているRotateMenu.csを参照してください。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages