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
560
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
86
Other Decks in Programming
See All in Programming
開発生産性を上げるための生成AI活用術
starfish719
3
380
Advance Your Career with Open Source
ivargrimstad
0
460
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
3
390
Swift Concurrency - 状態監視の罠
objectiveaudio
2
490
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
0
410
Cursorハンズオン実践!
eltociear
2
790
XP, Testing and ninja testing ZOZ5
m_seki
3
580
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
200
10年もののAPIサーバーにおけるCI/CDの改善の奮闘
mbook
0
800
Six and a half ridiculous things to do with Quarkus
hollycummins
0
140
CSC509 Lecture 02
javiergs
PRO
0
410
Cloudflare AgentsとAI SDKでAIエージェントを作ってみた
briete
0
130
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
51k
Embracing the Ebb and Flow
colly
88
4.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Code Review Best Practice
trishagee
72
19k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Building Applications with DynamoDB
mza
96
6.7k
Raft: Consensus for Rubyists
vanstee
139
7.1k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
How GitHub (no longer) Works
holman
315
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~)
ご清聴 ありがとうございました