2016-11-19 2 views
1

Daydream보기 및 컨트롤러가 포함 된 Pixel 테스트에서 Daydream 지원과 함께 Unity 기술 미리보기를 사용하고 있습니다.Google Daydream의 순간 이동 카메라가 작동하지 않습니다.

내 장치를 내 장치에 성공적으로 배포했으며 모든 것이 예상대로 작동합니다.

그러나 내 인생에서 카메라를 순간 이동시킬 수는 없습니다. 나는 바닥을 가리키며 다른 물체를 내가 가리키는 곳에 텔레포트 할 수 있지만 카메라는 텔레포트 할 수 없다. 실제로 변환을 확인하면 카메라가 텔레포트되지만 픽셀에 표시되는 뷰는 업데이트되지 않습니다. GVRViewer 스크립트에서 호출해야하는 것이 있습니까?

가 여기에 관련 코드입니다 : 더 강렬 인터넷 검색 후

RaycastHit hitInfo; 
      Vector3 rayDirection = GvrController.Orientation * Vector3.forward; 
      if (Physics.Raycast(controllerPivot.transform.position, rayDirection, out hitInfo)) { 
       if (hitInfo.collider && hitInfo.collider.gameObject) { 
        SetSelectedObject(hitInfo.collider.gameObject); 

        //Teleport on click 
        if (selectedObject == floor) { 
         if (GvrController.ClickButtonDown) { 
          selectedObject.GetComponent<Renderer>().material = cubeActiveMaterial; 
          controllerPivot.transform.position = new Vector3 (hitInfo.point.x, controllerPivot.transform.position.y, hitInfo.point.z); 
          playerCamera.transform.position = new Vector3 (hitInfo.point.x, playerCamera.transform.position.y, hitInfo.point.z); 
          gvrControllerMain.transform.position = new Vector3 (hitInfo.point.x, gvrControllerMain.transform.position.y, hitInfo.point.z); 
        } 
       } 
      } 

답변

관련 문제