Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Leap Motionを使ったハンドジェスチャー / yusuke-smcn3-present...
Search
yusuke ota
June 15, 2019
Programming
0
540
Leap Motionを使ったハンドジェスチャー / yusuke-smcn3-presentation
Leap Motionを使ったハンドジェスチャーを行いたかった話。
yusuke ota
June 15, 2019
Tweet
Share
More Decks by yusuke ota
See All by yusuke ota
XR Interaction Toolkitではまった話 / yusuke-xrshimane5-presentation
yusukeota
0
4.8k
Rustざっくり説明 / yusuke-east_shimane_rs0-presentation
yusukeota
0
85
Other Decks in Programming
See All in Programming
Java on Azure で LangGraph!
kohei3110
0
170
関数型まつりレポート for JuliaTokai #22
antimon2
0
160
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
590
PicoRuby on Rails
makicamel
2
110
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
320
VS Code Update for GitHub Copilot
74th
1
480
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.7k
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
590
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
120
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
PipeCDのプラグイン化で目指すところ
warashi
1
220
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
130
Featured
See All Featured
Music & Morning Musume
bryan
46
6.6k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
Designing for humans not robots
tammielis
253
25k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Practical Orchestrator
shlominoach
188
11k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
A Tale of Four Properties
chriscoyier
160
23k
Producing Creativity
orderedlist
PRO
346
40k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Unsuck your backbone
ammeep
671
58k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Transcript
Leap Motionを使った ハンドジェスチャー Ota Yusuke(@yusuke ota) 参考文献 Leap Motion Unity
SDK v3.2 Beta documentation https://developer-archive.leapmotion.com/documentation/v2/unity/unity/Unity_DetectionUtilities.html
環境 OS: Windows10 1809 Unity: 2019.1.4f1 Orion:4.4.0 HMD: Vive
このLT中の写真は ViveにLeap Motionを つけた状態で 撮影しています
Leap Motion SDKでは 条件を与えて、 オリジナル ハンドジェスチャー を定義できます(形状のみ)
使える条件は6つ DetectorLogicGate:”AND” or “OR” ExtendedFingerDetector:指の開閉 FingerDirectionDetector:指の向き PalmDirectionDetector:掌の向き PinchDetector:つまんでいるか ProximityDetector:距離
Detector すべてのDetectorの継承元 On Activate(): 判定が真の時実行する処理 (複数選択可) On Deactivate(): 判定が真→偽に変わった時 実行する処理
(複数選択可)
DetectorLogicGate Detector同士をAndやOrで結合する Detectors: 結合するDetectorの数と対象を選択 Add All Sibling (以下略): このオブジェクトについている すべてのDetectorを対象に設定
Detectorsの設定を無効 Gate Type: AndかOrで論理演算の種類を選択 Negate: 判定結果の否定を返す
ExtendedFingerDitector 指の開閉を判定する 周期: 判定を行う周期 Hand Module: 判定を行う手のモデル Finger States: 指の状態を、開、閉、どちらかの
3種類で設定 Min and Max Finger Counts: 開いている状態の指の最大数、最小数 を設定
FingerDirectionDetector 特定の指の向きを判定する Finger Name: 判定する指の指定 Pointing Type: 対象とする座標系を選択 Pointing Direction:
座標系をに対する向きを設定 On Angle: 判定が真になる時の角度 Off Angle: 判定が真→偽になる時の角度
PalmDirectionDetector 手のひらの向きの判定 FingerDirectionDetectorの手のひら版
PinchDetector 親指と小指の距離を判定 Controls Transform: 判定が真のときに、 オブジェクトを動かすかどうか Activate Distance: 判定が真になる時の距離 Deactivate
Distance: 判定が真→偽になる時の距離
ProximityDetector 物体の距離を判定する On Proximity: 判定が真のオブジェクトを渡す対象 Tag Name: タグで一括追加 Use Layers
Not List: Unityのレイヤーで一括設定
case1: サムズアップ判定 Leap Motionでサムズアップを判定する 際に必要な条件は ・2つの条件を同時に満たすこと ・指の開閉 ・親指の向き
使える条件は6つ DetectorLogicGate:”AND” or “OR” ExtendedFingerDetector:指の開閉 FingerDirectionDetector:指の向き PalmDirectionDetector:掌の向き PinchDetector:つまんでいるか ProximityDetector:距離
サムズアップ判定 DetectorLogicGate ExtendedFingerDetector FingerDirectionDetector を追加 On Activate()に有効時 On Deactivate()に無効時 の動作を追加
Case2: 物体保持判定 Unityで物をつかみ上げる動作をする には ・握りこんだ判定 ・接触しているオブジェクトの取得 ・物をハンドモジュールの子に変更 処理が多くて実装がめんどくさい
Leap Motion Interaction Engine を 使う Leap_Motion_Interaction_Engine_1.2. 0.unitypackageをインポートして、 プレハブInteraction Managerを使用
InteractionBehaviour で保持判定追加 オブジェクトにInteractionBehaviourを追加するだ けで判定可能に 保持時の移動をオンにすればオブジェクトの持ち運 びも可能
詳しい情報が欲しい方は Leap Motion Detectionで検索 Leap Motionのアーカイブ(V3.2) https://developer-archive.leapmotion.com/documentation/v2/unity/unity/Unity_DetectionUtilities.html Leap Motion Unity
Modules 4.4 https://leapmotion.github.io/UnityModules/class_leap_1_1_unity_1_1_detector.html を読みましょう Slackで気軽に聞いてください
ところで 普通の ジェスチャーは?
Leap Motion SDK Gesture Support V2:JS,C#,C++ etc V3:JS,C++ V4:Null(2018.6~)
ご清聴 ありがとうございました