Created
October 30, 2016 05:09
-
-
Save arumani/bb463c7a525b1ffd498d0470371bc8d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git Assets/GoogleVR/Legacy/Scripts/GvrHead.cs Assets/GoogleVR/Legacy/Scripts/GvrHead.cs | |
index 277b562..e666510 100644 | |
--- Assets/GoogleVR/Legacy/Scripts/GvrHead.cs | |
+++ Assets/GoogleVR/Legacy/Scripts/GvrHead.cs | |
@@ -122,6 +122,8 @@ public class GvrHead : MonoBehaviour { | |
transform.position = target.position + target.rotation * pos; | |
} | |
} | |
+ // GVR+Vuforia | |
+ Vuforia.VuforiaBehaviour.Instance.UpdateState(false, true); | |
if (OnHeadUpdated != null) { | |
OnHeadUpdated(gameObject); | |
diff --git Assets/GoogleVR/Legacy/Scripts/Internal/GvrEye.cs Assets/GoogleVR/Legacy/Scripts/Internal/GvrEye.cs | |
index 7227e76..76f1aed 100644 | |
--- Assets/GoogleVR/Legacy/Scripts/Internal/GvrEye.cs | |
+++ Assets/GoogleVR/Legacy/Scripts/Internal/GvrEye.cs | |
@@ -149,6 +149,8 @@ public class GvrEye : MonoBehaviour { | |
cam.rect = GvrCameraUtils.FixEditorViewport(cam.rect, profileAspect, windowAspect); | |
} | |
} | |
+ // GVR+Vuforia | |
+ Vuforia.VuforiaBehaviour.Instance.ApplyCorrectedProjectionMatrix(proj, eye == GvrViewer.Eye.Left); | |
} | |
private void SetupStereo(bool forceUpdate) { | |
diff --git Assets/GoogleVR/Legacy/Scripts/Internal/VRDevices/GvrDevice.cs Assets/GoogleVR/Legacy/Scripts/Internal/VRDevices/GvrDevice.cs | |
index 1f207db..7d7a8ec 100644 | |
--- Assets/GoogleVR/Legacy/Scripts/Internal/VRDevices/GvrDevice.cs | |
+++ Assets/GoogleVR/Legacy/Scripts/Internal/VRDevices/GvrDevice.cs | |
@@ -75,6 +75,14 @@ namespace Gvr.Internal { | |
UpdateView(); | |
} | |
profileChanged = true; | |
+ // GVR+Vuforia | |
+ Vuforia.VuforiaBehaviour vuforia = Vuforia.VuforiaBehaviour.Instance; | |
+ | |
+ if (vuforia != null && vuforia.enabled) { | |
+ // Reset Vuforia | |
+ vuforia.enabled = false; | |
+ vuforia.enabled = true; | |
+ } | |
} | |
public override void Recenter() { | |
diff --git Assets/GoogleVR/Legacy/Scripts/Internal/VRDevices/iOSDevice.cs Assets/GoogleVR/Legacy/Scripts/Internal/VRDevices/iOSDevice.cs | |
index 0ffc342..6e1b0c3 100644 | |
--- Assets/GoogleVR/Legacy/Scripts/Internal/VRDevices/iOSDevice.cs | |
+++ Assets/GoogleVR/Legacy/Scripts/Internal/VRDevices/iOSDevice.cs | |
@@ -28,7 +28,8 @@ namespace Gvr.Internal { | |
} | |
public override void Init() { | |
- isOpenGL = isOpenGLAPI(); | |
+ // GVR+Vuforia | |
+ isOpenGL = false; | |
base.Init(); | |
} | |
diff --git Assets/Vuforia/Scripts/DefaultInitializationErrorHandler.cs Assets/Vuforia/Scripts/DefaultInitializationErrorHandler.cs | |
index cb827b9..758def8 100755 | |
--- Assets/Vuforia/Scripts/DefaultInitializationErrorHandler.cs | |
+++ Assets/Vuforia/Scripts/DefaultInitializationErrorHandler.cs | |
@@ -153,6 +153,10 @@ namespace Vuforia | |
{ | |
if (initError != VuforiaUnity.InitError.INIT_SUCCESS) | |
{ | |
+ // GVR+Vuforia | |
+ GvrViewer.Instance.VRModeEnabled = false; | |
+ GvrViewer.Instance.DistortionCorrectionEnabled = false; | |
+ | |
SetErrorCode(initError); | |
SetErrorOccurred(true); | |
} | |
diff --git Assets/dotFes/Scenes/HmdUITest.unity Assets/dotFes/Scenes/HmdUITest.unity | |
index e83329c..4bd8aea 100644 | |
Binary files Assets/dotFes/Scenes/HmdUITest.unity and Assets/dotFes/Scenes/HmdUITest.unity differ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment