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
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
320
GoのGenericsによるslice操作との付き合い方
syumai
3
690
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
160
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
210
童醫院敏捷轉型的實踐經驗
cclai999
0
190
FormFlow - Build Stunning Multistep Forms
yceruto
1
190
Create a website using Spatial Web
akkeylab
0
300
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
240
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
410
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
100
Gleamという選択肢
comamoca
6
760
Deep Dive into ~/.claude/projects
hiragram
8
1.5k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
53
7.7k
Being A Developer After 40
akosma
90
590k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Docker and Python
trallard
44
3.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Code Reviewing Like a Champion
maltzj
524
40k
The Cost Of JavaScript in 2023
addyosmani
51
8.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
124
52k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
How GitHub (no longer) Works
holman
314
140k
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~)
ご清聴 ありがとうございました