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
550
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.9k
Rustざっくり説明 / yusuke-east_shimane_rs0-presentation
yusukeota
0
85
Other Decks in Programming
See All in Programming
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
20
5.1k
Laravel Boost 超入門
fire_arlo
2
210
TanStack DB ~状態管理の新しい考え方~
bmthd
2
480
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
240
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
310
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
時間軸から考えるTerraformを使う理由と留意点
fufuhu
14
4.4k
Improving my own Ruby thereafter
sisshiki1969
1
160
Design Foundational Data Engineering Observability
sucitw
3
170
AIコーディングAgentとの向き合い方
eycjur
0
260
Microsoft Orleans, Daprのアクターモデルを使い効率的に開発、デプロイを行うためのSekibanの試行錯誤 / Sekiban: Exploring Efficient Development and Deployment with Microsoft Orleans and Dapr Actor Models
tomohisa
0
240
為你自己學 Python - 冷知識篇
eddie
1
340
Featured
See All Featured
Embracing the Ebb and Flow
colly
87
4.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
Agile that works and the tools we love
rasmusluckow
330
21k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Six Lessons from altMBA
skipperchong
28
4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Music & Morning Musume
bryan
46
6.8k
GitHub's CSS Performance
jonrohan
1032
460k
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~)
ご清聴 ありがとうございました