툴/유니티

유니티 + 립모션 (Unity + LeapMotion) 연결 및 위치값 받기

스튜디오 오버그래픽스 2022. 9. 23. 19:37

 

윈도우 립모션 SDK

https://developer.leapmotion.com/tracking-software-download

 

Download Ultraleap's Hand Tracking Software — Ultraleap for Developers

Download Ultraleap's Hand Tracking Software. It has everything you need to run your camera module and get tracked hands working for you.

developer.leapmotion.com

 

윈도우 SDK설치해서 실행후 하단표시줄에 아이콘 뜨고 Tracking상태여야 함.

 

유니티 립모션 SDK

https://developer.leapmotion.com/unity

 

Ultraleap Plugin for Unity — Ultraleap for Developers

Our latest Unity Modules Package unlocks new tools that you can use to design our world-leading hand tracking into your application.

developer.leapmotion.com

 

유니티 패키지 파일 형태로 임포트 할수 있음.

 

 

 

*테스트 진행

유니티 2021.3.4f1  HDRP

윈도우 SDK - 5.6.1

유니티 SDK - 5.13.0

 

 

유니티 프로젝트 파일 만들고

립모션 윈도우 SDK설치한거 실행해서 트랙킹 잘되는지 확인하고

유니티 패키지파일 'Tracking.unitypackage' 먼저 임포트 하고 'Tracking Examples.unitypackage'임포트 하기

씬중에 CapsuleHands(Desktop)이라는 씬이 있음.

 

하이라키를 보면 HandModels 안에 왼손,오른손 오브젝트가 있고

컴포넌트에 CapsuleHand스크립트가 있음

 

이 스크립트 80번째 줄에 벡터3배열로 '_spherePosition'가 있는데 값을 가져오기 위해 public으로 바꿔주고

 

클래스가 HandModelBase이고 네임스페이스가 Leap.Unity이다.

 

립모션 트랙킹 왼손 오른손의 위치값을 받아올 스크립트를 작성.

using Leap.Unity 라이브러리 추가

_spherePosition[0]을 가져오면 왼손 혹은 오른손의 손바닥 위치 가져옴.

 

 

 

 

+립모션 관련 에셋

https://assetstore.unity.com/packages/tools/input-management/the-essential-leap-motion-gesture-detection-111791?aid=1101lvqJ5 

 

The Essential Leap-Motion Gesture Detection | 입출력 관리 | Unity Asset Store

Get the The Essential Leap-Motion Gesture Detection package from The Great Alpaca and speed up your game development process. Find this & other 입출력 관리 options on the Unity Asset Store.

assetstore.unity.com

 

https://assetstore.unity.com/packages/3d/characters/humanoids/leap-motion-realistic-male-hands-109961?aid=1101lvqJ5 

 

Leap Motion Realistic Male Hands | 3D 휴머노이드 | Unity Asset Store

Elevate your workflow with the Leap Motion Realistic Male Hands asset from Storkplay. Find this & other 휴머노이드 options on the Unity Asset Store.

assetstore.unity.com

https://assetstore.unity.com/packages/tools/leap-motion-simple-control-69361?aid=1101lvqJ5 

 

Leap Motion Simple Control | 도구 | Unity Asset Store

Get the Leap Motion Simple Control package from cloeGames and speed up your game development process. Find this & other 도구 options on the Unity Asset Store.

assetstore.unity.com

 


스튜디오 오버그래픽스
정준희 Technical Artist
ovgrps@gmail.com