본 글은 Valem(https://www.youtube.com/watch?v=sKQOlqNe_WY&feature=youtu.be)의 영상을 참고하여 개발 중에 나온 이슈들을 해결한 내용들을 포함해 작성하였습니다.

우선 Unity 프로젝트 생성 후,

1. File -> Build Setting에서 Player Settings 설정에서 Virtual Reality Supported 설정을 활성화 해줍니다.

XR Setting - Oculus를 최상위로 / 여러 플렛폼에서 구동하려면 OpenVR로 설정

2. Asset 폴더에 OculusIntegration_1.38.0을 import합니다. 1.38 버전이후에 출시된 버젼은 오류가 있어서 옆 링크에서 1.38.0을 받아서 실행하는 것을 추천합니다. (https://developer.oculus.com/downloads/package/unity-integration/1.38.0/)

3. 기존의 Camera를 지우고, OVRPlayerController를 불러오고, 하위 OVRCameraRig에서 Tracking의 Origin Type을 Floor Level로 설정해줍니다.

OVRCamera를 불러온 뒤, Floor Level로 설정

4. OVRPlayerController에서는 카메와 Avatar의 움직임을 연결하기 위해 Character Camera Constraint를 추가하고 CameraRig를 OVR로 설정해 줍니다.

Camera Rig를 OVRCameraRig(OVRCameraRig)로 설정

5. 아래 구조처럼 LocalAvatar, AvatarGrabberLeft & Right를 추가해주고 실행하면 손, 움직임등이 작동합니다.

6. 손의 자연스러운 움직임 (끊김 방지)를 위해 Time에서 1/90으로 설정해줘서 Frame조정을 해줍니다. (Default값: 0.2)

추가적으로 Custom Hand를 사용하기 위해서는 (https://www.youtube.com/watch?v=rnOR1OANIAU) 해당 영상을 참고! Local Avatar는 단순한 기능밖에 없기 때문에 복잡하거나 다양한 Interaction을 위해서는 Custom hand를 사용하는것이 좋습니다.

+ Recent posts