UNITY

[UNITY] HandController 오큘러스에서 움직이는 손 만들기

멍정 2022. 4. 14. 01:35

학기 중에 하던 프로젝트에서 하고싶었지만 결국 실패했던 움직이는 손 만들기!!

나와 같은 고민을 하고 계신 외국 블로거(? 님의 도움으로 해결했다 ㅠㅠ

지금 사용하고 있는 xr interaction toolkit은 왜인지 손 오브젝트를 지원해주지 않는다ㅠㅠ

그래서 전부터 오큘러스 에셋에 있는 손을 탐내고 있었다.

이 블로거 분도 나와 같이 오큘러스에 있는 에셋을 사용해서 손을 구현했다. 

 

움직이는 오큘러스 컨트롤러 만들기

블로그 본문은 요기

https://medium.com/datastuffplus/using-oculus-integration-hand-animations-with-unity-xr-kit-e707b6acb0a2

 

Using Oculus Integration Hand Animations with Unity XR Kit

Step by step guide to adding hand animations to XR

medium.com

구체적인 방법은 상단에 있는 블로그 링크에 있으니 간단하게 짚고 넘어가자면

1. xr interaction toolkit 설치

Pakage Manager -> xr  interaction toolkit

2. Oculus 에셋 설치

https://assetstore.unity.com/packages/tools/integration/oculus-integration-82022

 

Oculus Integration | 기능 통합 | Unity Asset Store

Use the Oculus Integration from Oculus on your next project. Find this integration tool & more on the Unity Asset Store.

assetstore.unity.com

3. CustomHands 폴더 받아오기

SampleFramework ->Core -> CustomHands

4. CustomHands 폴더의 스크립트 폴더 삭제하기

CustomHands -> Scripts

5. CustomHands 폴더의 프리펩을 Hand Controller 밑에 넣어주기

5-1. XR Origin은 Hierarchy에서 추가할 수 있다

Hierarchy -> XR -> XR Origin

6. hand Anim 스크립트를 받아 방금 넣은 프리펩에 넣기

컨트롤러 칸에 컨트롤러도 넣어줘야함!

https://github.com/KAPastor/XRHandAnimations

스크립트는 이 깃허브에서 받을 수 있다~~

 

GitHub - KAPastor/XRHandAnimations

Contribute to KAPastor/XRHandAnimations development by creating an account on GitHub.

github.com

여기까지 하면 완성!

 

hand controller 완성!

블로그에서 보여준 모든 손동작이 되는건 아니라서 나중에 좀 더 찾아봐야겠당..!