VR 콘텐츠 기초

[Meta Quest, VR, Oculus] 유령 Icon, Mesh, Line, Hand 만들기 (Create Ghost Reticles, Create Ghost Icon Reticle, Create Ghost Mesh Reticle, Create Ghost Line Reticle, Create Ghost Hand Reticle)

다모아 2023. 10. 25. 13:35

시작 전

멀리있는 물체 잡기 상호작용이 되어있어야함

https://developer.oculus.com/documentation/unity/unity-isdk-create-ghost-reticles/

 

Create Ghost Reticles | Oculus Developers

 

developer.oculus.com


유령 아이콘 십자선 만들기(Create Ghost Icon Reticle)

 

1. 빈 오브젝트를 만들고 ReticleLeftHand, ReticleRightHand, ReticleLeftControllerHand, ReticleRightControllerHand 총 4개 빈오브젝트 이름 수정해서 만들기

 

2. 만든 빈 오브젝트 4개에 ReticleIcon prefab 집어넣기

3. ReticleIcon안에 Inscpector에서 Reticle Icon Drawer 스크립트에 Distance Interactor는 ReticleLeftHand에 넣는거면 OVRHands > LeftHand > HandInteractorsLeft > DistanceHandGrabInteractor이거 집어넣기

 

4. Reticle Icon Drawer 스크립트에 Center Eye는 OVRCameraRig > TrackingSpace > CenterEyeAnchor 이거 집어넣기

5. 나머지도 똑같이 적용해주기

 

6. 만든 큐브에 HandGrabInteractable이라는 오브젝트에 Reticle Data Icon 추가해주기

 

7. Reticle Data Icon안에 Renderer와 Custom Icon 추가해주기

십자선


유령 Mesh 십자선(Create Ghost Mesh Reticle)

 

1. ReticleMesh prefab을 ReticleLeftHand, ReticleRightHand, ReticleLeftControllerHand, ReticleRightControllerHand에 넣어주기

 

2. ReticleMesh의 Inspector에서 Reticle Mesh Drawer component에 Hand Grab Interactor에다가 ReticleLeftHand 오브젝트라면 OVRHands > LeftHand > HandInteractorsLeft > DistanceHandGrabInteractor이거 집어넣기

3. Reticle Data Mesh를 Cube에다가 붙여주는데 나는 HandGrabInteractable에 component를 추가해준다.

Filter는 Cube를 추가해준다. (Mesh가 있는 Cube)


유령 라인 십자선(Create Ghost Line Reticle)

 

1. ReticleLeftHand, ReticleRightHand, ReticleLeftControllerHand, ReticleRightControllerHand에다가 ReticleLine prefab을 넣어준다.

 

2. ReticleLine Inspector에 Distant Interaction Tube Visual에서 Distance Interactor에다가 각자의 DistanceHandGrabInteractor를 추가해준다.(위의 DistanceHandGrabInteractor 추가해준 것과 동일)


유령 손 십자선(Create Ghost Hand Reticle)

 

1. ReticleLeftHand, ReticleLeftControllerHand에다가 OVRLeftHandReticle prefab을 넣어준다.

2. ReticleRightHand, ReticleRightControllerHand에다가 OVRRightHandReticle prefab을 넣어준다.

 

3. OVRXXXHandReticle의 Inspector에서 Reticle Ghost Drawer component에 Hand Grab Interactor는 각자의 DistanceHandGrabInteractor를 추가하고 Hand Visual은 방금 추가한 OVRXXXHandReticle의 자식을 보면 OVRXXXHandVisual이 있는데 이걸 추가해준다. (LeftHand에서의 OVRLeftHandReticle의 OVRLeftHandVisual을 추가하지 말 것)

4. 아래에 Active State Tracker component는 OVRCameraRig > OVRInteraction에 있는 각자의 LeftHand, RightHand, LeftControllerHand, RightControllerHand를 추가해준다.

5. OVRXXXHandReticle > OVRXXXHandSynthetic에서 Inspector의 Synthetic Hand component의 I Modify Data From Source Mono에다가 LeftHand, RightHand, LeftControllerHand, RightControllerHand를 각자의 OVRXXXHandSynthetic에 추가해준다.

6. Cube의 HandGrabInteractable에 Reticle Data Ghost prefab을 추가해준다.

7. Reticle Data Ghost의 Target Point를 Cube로 해준다.


ReticleLeftHand, ReticleRightHand, ReticleLeftControllerHand, ReticleRightControllerHand의 구성