├── Assets ├── Plugins │ ├── Android │ │ ├── assets │ │ │ ├── placeholder.txt │ │ │ └── placeholder.txt.meta │ │ ├── libOculusMediaSurface.so │ │ ├── assets.meta │ │ └── libOculusMediaSurface.so.meta │ ├── x86 │ │ ├── OVRGamepad.dll │ │ └── OVRGamepad.dll.meta │ ├── x86_64 │ │ ├── OVRGamepad.dll │ │ └── OVRGamepad.dll.meta │ ├── x86.meta │ ├── x86_64.meta │ ├── Android.meta │ ├── OVRGamepad.bundle │ │ ├── Contents │ │ │ ├── MacOS │ │ │ │ ├── OVRGamepad │ │ │ │ └── OVRGamepad.meta │ │ │ ├── Info.plist.meta │ │ │ ├── MacOS.meta │ │ │ └── Info.plist │ │ └── Contents.meta │ └── OVRGamepad.bundle.meta ├── OVR │ ├── Textures │ │ ├── in.png │ │ ├── up.png │ │ ├── down.png │ │ ├── left.png │ │ ├── out.png │ │ ├── Black.png │ │ ├── right.png │ │ ├── cube_texture.png │ │ ├── Icons.meta │ │ ├── Logos.meta │ │ ├── Icons │ │ │ ├── OculusIcon.png │ │ │ └── OculusIcon.png.meta │ │ ├── Logos │ │ │ ├── OculusLogo.png │ │ │ └── OculusLogo.png.meta │ │ ├── Volume Controls.meta │ │ ├── Black.png.meta │ │ ├── down.png.meta │ │ ├── in.png.meta │ │ ├── left.png.meta │ │ ├── out.png.meta │ │ ├── up.png.meta │ │ ├── right.png.meta │ │ └── cube_texture.png.meta │ ├── Materials.meta │ ├── Textures.meta │ ├── Scenes │ │ ├── Cubes.unity.meta │ │ ├── Room.unity.meta │ │ ├── Trivial.unity.meta │ │ └── Trivial.unity │ ├── Materials │ │ ├── Arrow.mat.meta │ │ ├── CubeMaterial.mat.meta │ │ ├── CubeMaterial.mat │ │ └── Arrow.mat │ ├── Editor.meta │ ├── Meshes.meta │ ├── Moonlight.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── OVRCameraRig.prefab.meta │ │ ├── OVRPlayerController.prefab.meta │ │ ├── OVRTrackerBounds.prefab.meta │ │ └── OVRCameraRig.prefab │ ├── Scenes.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── Util.meta │ │ ├── OVRCameraRig.cs.meta │ │ ├── OVRCommon.cs.meta │ │ ├── OVRDisplay.cs.meta │ │ ├── OVRManager.cs.meta │ │ ├── OVRPlugin.cs.meta │ │ ├── OVRProfile.cs.meta │ │ ├── OVRTracker.cs.meta │ │ ├── Util │ │ │ ├── OVRDebugInfo.cs.meta │ │ │ ├── OVRGridCube.cs.meta │ │ │ ├── OVRScreenFade.cs.meta │ │ │ ├── OVRGamepadController.cs.meta │ │ │ ├── OVRPlayerController.cs.meta │ │ │ ├── OVRSceneSampleController.cs.meta │ │ │ ├── OVRTrackerBounds.cs.meta │ │ │ ├── OVRScreenFade.cs │ │ │ ├── OVRGridCube.cs │ │ │ ├── OVRSceneSampleController.cs │ │ │ └── OVRTrackerBounds.cs │ │ ├── OVROnCompleteListener.cs.meta │ │ ├── OVRInput.cs.meta │ │ ├── OVROnCompleteListener.cs │ │ ├── OVRTracker.cs │ │ ├── OVRCommon.cs │ │ ├── OVRProfile.cs │ │ └── OVRDisplay.cs │ ├── Moonlight │ │ ├── Editor.meta │ │ ├── Materials.meta │ │ ├── Prefabs.meta │ │ ├── Resources.meta │ │ ├── Scripts.meta │ │ ├── Shaders.meta │ │ ├── Textures.meta │ │ ├── Scripts │ │ │ ├── Utils.meta │ │ │ ├── OVROverlay.cs.meta │ │ │ ├── OVRTouchpad.cs.meta │ │ │ ├── OVRPlatformMenu.cs.meta │ │ │ ├── OVRVolumeControl.cs.meta │ │ │ ├── Utils │ │ │ │ ├── OVRModeParms.cs.meta │ │ │ │ ├── OVRDebugGraph.cs.meta │ │ │ │ ├── OVRInputControl.cs.meta │ │ │ │ ├── OVRMonoscopic.cs.meta │ │ │ │ ├── OVRWaitCursor.cs.meta │ │ │ │ ├── OVRChromaticAberration.cs.meta │ │ │ │ ├── OVRResetOrientation.cs.meta │ │ │ │ ├── OVRWaitCursor.cs │ │ │ │ ├── OVRResetOrientation.cs │ │ │ │ ├── OVRMonoscopic.cs │ │ │ │ ├── OVRChromaticAberration.cs │ │ │ │ ├── OVRModeParms.cs │ │ │ │ └── OVRDebugGraph.cs │ │ │ ├── OVRDebugHeadController.cs.meta │ │ │ ├── OVRVolumeControl.cs │ │ │ ├── OVROverlay.cs │ │ │ ├── OVRDebugHeadController.cs │ │ │ └── OVRTouchpad.cs │ │ ├── Materials │ │ │ ├── GlobalMenu.meta │ │ │ ├── GlobalMenu │ │ │ │ ├── gaze_cursor.mat.meta │ │ │ │ ├── cursor_timer_material.mat.meta │ │ │ │ ├── gaze_cursor.mat │ │ │ │ └── cursor_timer_material.mat │ │ │ ├── VolumePopupMaterial.mat.meta │ │ │ └── VolumePopupMaterial.mat │ │ ├── Prefabs │ │ │ ├── GlobalMenu.meta │ │ │ └── GlobalMenu │ │ │ │ ├── Cursor_Timer.prefab.meta │ │ │ │ └── Cursor_Timer.prefab │ │ ├── Resources │ │ │ ├── OVRVolumeController.prefab.meta │ │ │ ├── Unlit Transparent Color.shader.meta │ │ │ ├── Unlit Transparent Color.shader │ │ │ └── OVRVolumeController.prefab │ │ ├── Textures │ │ │ ├── GlobalMenu.meta │ │ │ ├── GlobalMenu │ │ │ │ ├── gaze_cursor.png │ │ │ │ ├── color_ramp_timer.tga │ │ │ │ ├── gaze_cursor_timer.tga │ │ │ │ ├── gaze_cursor.png.meta │ │ │ │ ├── color_ramp_timer.tga.meta │ │ │ │ └── gaze_cursor_timer.tga.meta │ │ │ ├── Volume Controls.meta │ │ │ └── Volume Controls │ │ │ │ ├── VolumeAtlas.png │ │ │ │ └── VolumeAtlas.png.meta │ │ ├── Shaders │ │ │ ├── Unlit Crosshair.shader.meta │ │ │ ├── OVRColorRampAlpha.shader.meta │ │ │ ├── Unlit Crosshair.shader │ │ │ └── OVRColorRampAlpha.shader │ │ └── Editor │ │ │ ├── OVRMoonlightLoader.cs.meta │ │ │ └── OVRMoonlightLoader.cs │ ├── Editor │ │ ├── OVRBuild.cs.meta │ │ └── OVRBuild.cs │ └── Meshes │ │ ├── Cone.obj.meta │ │ └── Cone.obj ├── OVR.meta ├── Plugins.meta ├── OVRNaturalMovement.meta └── OVRNaturalMovement │ ├── Scenes │ └── Example.unity.meta │ ├── Prefabs.meta │ ├── Scenes.meta │ ├── Scripts.meta │ ├── Scripts │ ├── Tutor.cs.meta │ ├── OVRTrackerMarker.cs.meta │ ├── OVRNaturalMovementController.cs.meta │ ├── OVRTrackerMarker.cs │ ├── Tutor.cs │ └── OVRNaturalMovementController.cs │ ├── Materials │ ├── Line.mat.meta │ └── Line.mat │ ├── Materials.meta │ ├── Shaders.meta │ ├── Prefabs │ └── OVRNaturalMovementController.prefab.meta │ └── Shaders │ ├── Line.shader.meta │ └── Line.shader ├── ProjectSettings ├── ProjectVersion.txt ├── UnityAdsSettings.asset ├── UnityAnalyticsManager.asset ├── NetworkManager.asset ├── TimeManager.asset ├── AudioManager.asset ├── EditorSettings.asset ├── TagManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── NavMeshLayers.asset ├── NavMeshAreas.asset └── QualitySettings.asset ├── .gitignore └── README.md /Assets/Plugins/Android/assets/placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.2.2f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/in.png -------------------------------------------------------------------------------- /Assets/OVR/Textures/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/up.png -------------------------------------------------------------------------------- /Assets/OVR/Textures/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/down.png -------------------------------------------------------------------------------- /Assets/OVR/Textures/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/left.png -------------------------------------------------------------------------------- /Assets/OVR/Textures/out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/out.png -------------------------------------------------------------------------------- /Assets/OVR.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 869fc009969608e4a9071237c584be0d 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/Black.png -------------------------------------------------------------------------------- /Assets/OVR/Textures/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/right.png -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8619015675705434a8d74b228676b99c 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Plugins/x86/OVRGamepad.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/Plugins/x86/OVRGamepad.dll -------------------------------------------------------------------------------- /Assets/OVR/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 981b5bce7fc4a2d43a2169710da4b892 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1938789817fe3974ea20e502ed4bcd76 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/cube_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/cube_texture.png -------------------------------------------------------------------------------- /Assets/Plugins/x86_64/OVRGamepad.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/Plugins/x86_64/OVRGamepad.dll -------------------------------------------------------------------------------- /Assets/OVR/Textures/Icons.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e081f465852cec14380da085e957c52b 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/Logos.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c18650754748f647bacde4e2116cbff 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /Assets/OVR/Scenes/Cubes.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d920b3d2525670f4abad3d20eda3b349 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/Icons/OculusIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/Icons/OculusIcon.png -------------------------------------------------------------------------------- /Assets/OVR/Textures/Logos/OculusLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Textures/Logos/OculusLogo.png -------------------------------------------------------------------------------- /Assets/OVR/Materials/Arrow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 669025377795b574da66d9bb2472fcab 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /ProjectSettings/UnityAnalyticsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/ProjectSettings/UnityAnalyticsManager.asset -------------------------------------------------------------------------------- /Assets/OVR/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76c19abd24bec62459b5f0d26fdd9a85 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Materials/CubeMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62db2d638434d5a488dfb1e789e34b37 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Meshes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db348133d6680dd459f3e1cb19922746 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 907a45230f76e2648a77a883d8a44ef4 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bfe39332fdb4cb044b619b3e4b890396 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Prefabs/OVRCameraRig.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 126d619cf4daa52469682f85c1378b4a 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68bc04068edcc1a4d89699ab4e2e69ae 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 859d6d3fcffe1bb41ac06f93d267fc9d 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43a08c530af3d4e7aa7dad379a4695d6 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Scenes/Example.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d71f4ffdbb8a40c3a2a327b5f46a7d4 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Plugins/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c71c6a96f47554489da40c46ce2b5f9 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Plugins/x86_64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3128b471ccceabc44a612250919362e6 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0c7a593695f68e4bbe0cabb0f4f93f2 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Plugins/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e70f602274907ef44ac89bb47c8f981c 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/placeholder.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5db725717cf1cf6459d88b17b55d7e9b 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Plugins/Android/libOculusMediaSurface.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/Plugins/Android/libOculusMediaSurface.so -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fdf7b4c84e90ee4680f94a1bb14d924 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0dfb71213a5d7ac4d945ee631e96f12d 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7bac891528884fae98d1833129e00c8 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbc7afdc98e4a5149bb14de17f484a1c 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69c517c9d28564d4f9e942f8c61b0b08 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4ba6b13aefc8324483c8445e4919c32 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40039fb1d08a4254493e83dbf441cec6 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Prefabs/OVRPlayerController.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce816f2e6abb0504092c23ed9b970dfd 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Scenes/Room.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54445976c1dbf1c49bb38ba7eba558e8 3 | DefaultImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 573c133cd66074674a7d789c724d2184 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f675297882ab4fe38b0c70aeed076bb 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fbfa37feb47f4710bc9eb52d582b748 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23255d9dbce92a34488bb85999c82564 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 471e4a37f973f2347b4d13c3c6ba05c5 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Materials/GlobalMenu.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 181863ea9b49bc7409b328dc165431ee 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Materials/GlobalMenu/gaze_cursor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f31de375e167154aa45929466af30e4 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Materials/VolumePopupMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f63cb594c65fd54ba6388679c4a8b4a 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Prefabs/GlobalMenu.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60c24523d20c8e648a13ce9763553a98 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Resources/OVRVolumeController.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad78064c1d146c247aa723026a121555 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/GlobalMenu.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8319fd41de161214db0ae5149b9f7716 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/GlobalMenu/gaze_cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Moonlight/Textures/GlobalMenu/gaze_cursor.png -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Prefabs/GlobalMenu/Cursor_Timer.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a7682c244a150b49965c007720bdbb7 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/Volume Controls.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff9f18d40b614d04db7037186df109cd 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Plugins/OVRGamepad.bundle/Contents/MacOS/OVRGamepad: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/Plugins/OVRGamepad.bundle/Contents/MacOS/OVRGamepad -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Materials/GlobalMenu/cursor_timer_material.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9531aa878fd5c4749b288b72024e8d2f 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/GlobalMenu/color_ramp_timer.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Moonlight/Textures/GlobalMenu/color_ramp_timer.tga -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/Volume Controls/VolumeAtlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Moonlight/Textures/Volume Controls/VolumeAtlas.png -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Shaders/Unlit Crosshair.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05b53b473302943b58b8e33c93a38dac 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/GlobalMenu/gaze_cursor_timer.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taphos/oculus-natural-movement/HEAD/Assets/OVR/Moonlight/Textures/GlobalMenu/gaze_cursor_timer.tga -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0166666005 7 | Maximum Allowed Timestep: .0166666005 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /Assets/OVR/Editor/OVRBuild.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fef522d0247215a43be6b1a8819bd940 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scenes/Trivial.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8d21f2460d13554780e4af04a9e0d6e 3 | timeCreated: 1427350486 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRCameraRig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df9f338034892c44ebb62d97894772f1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRCommon.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 176f8d665b1d78048b1e87956698df6b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRDisplay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb365ebe8e821fc4e81e9dca9d704357 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e933e81d3c20c74ea6fdc708a67e3a5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: -100 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRPlugin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61abd23f3aff5394ba8027ee380760b8 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRProfile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08539141953f28e439731aaf7cd5362f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRTracker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cb3c9d4cb0970e448c655096649e814 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Scripts/Tutor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22bab6ba9570c46708980a84429c005b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRDebugInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b71d1996d67004241a3b69960856ffcb 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRGridCube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4988596c8a187f94f8e6a345ebb4254b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Materials/Line.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97f5b0e04b4ddf147822d4cc38a162f9 3 | timeCreated: 1441319802 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/OVROverlay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4444ce35d262aa648ad0c425a559b931 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/OVRTouchpad.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ab9178817a837a49a7da8cd5a5792e5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Prefabs/OVRTrackerBounds.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2974223ebbb4d524e959f2b0d67b0088 3 | timeCreated: 1435112826 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVROnCompleteListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8730118d7f00f9b47b09be73f7e91d2b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRScreenFade.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df8e1d778abf442e4bec449c360e9e1c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: -100 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Scripts/OVRTrackerMarker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 926cfb2539fbb42d9805357527722033 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Editor/OVRMoonlightLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c86538ded11bfe24c8c79818bb9ea66a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/OVRPlatformMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2afcf575f4a68de4db434c7b7233c451 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/OVRVolumeControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84ef17b01bf63784d89787adc8cb1256 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRModeParms.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a6ae8e8def81df429a8fdfc00f63e5c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRGamepadController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1bf170db1c6a44a44941f0cfb6048fd4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRPlayerController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0950df82e7936c84983497630bde5b54 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/OVRGamepad.bundle/Contents/Info.plist.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5de957de5187b406687f99aa5a30871b 3 | timeCreated: 1441327083 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRDebugGraph.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 797679fd8f4874961be68d62c143a328 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRInputControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 050a6fb8896a374499961e99446f4e48 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRMonoscopic.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06ef2a389c534554c848533f88dbb32c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRWaitCursor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d313011a8bc474fe49260bde01cffcd3 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRSceneSampleController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f07515ada089df47868559a20dd6783 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58c0cb7fe1bd03e4e9642077b6389d9a 3 | folderAsset: yes 4 | timeCreated: 1441319792 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9d3ddccf2c8cc340b86a15862957985 3 | folderAsset: yes 4 | timeCreated: 1441319780 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/OVRGamepad.bundle/Contents/MacOS/OVRGamepad.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3af79ea9cc1984e498b6a7e5409cdcac 3 | timeCreated: 1441327083 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRChromaticAberration.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b56515a831f2fb44bc7ae02679aeebc 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRResetOrientation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09bb0a17b6a704298b65be4fb08ef480 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Scripts/OVRNaturalMovementController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 534ebcf34591d415295ce784552361f9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/Volume Controls.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d7b90bdf04764b449cad07aa4f4ba59 3 | folderAsset: yes 4 | timeCreated: 1440036201 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Prefabs/OVRNaturalMovementController.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f15b0251692f84f3493beab16ccfc050 3 | timeCreated: 1441319516 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Shaders/Line.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3afe2e3fa178504c8131053bc886648 3 | timeCreated: 1441319562 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/OVRGamepad.bundle/Contents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 648a2605a2bc848728f27adc59fe8010 3 | folderAsset: yes 4 | timeCreated: 1441327083 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Shaders/Line.shader: -------------------------------------------------------------------------------- 1 | Shader "OVRNaturalMovement/Line" { 2 | SubShader { 3 | Pass { 4 | Blend SrcAlpha OneMinusSrcAlpha 5 | BindChannels { Bind "Color", color } 6 | ZWrite Off 7 | Cull Front 8 | Fog { Mode Off } 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /Assets/Plugins/OVRGamepad.bundle/Contents/MacOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fad9c333897547a59f91edacd69f7db 3 | folderAsset: yes 4 | timeCreated: 1441327083 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Shaders/OVRColorRampAlpha.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b95caf64e2cc3614892026a94bb2be84 3 | timeCreated: 1433268462 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Resources/Unlit Transparent Color.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ced943c76cb8fb8489bab18c3dfcdcd3 3 | timeCreated: 1435284538 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | m_SpeedOfSound: 347 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_DSPBufferSize: 0 12 | m_DisableAudio: 0 13 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRTrackerBounds.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae38dbfcc5d43bf48bb391cbb09eb48f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | 6 | # Autogenerated VS/MD solution and project files 7 | /*.csproj 8 | /*.unityproj 9 | /*.sln 10 | /*.suo 11 | /*.user 12 | /*.userprefs 13 | /*.pidb 14 | /*.booproj 15 | 16 | #Unity3D Generated File On Crash Reports 17 | sysinfo.txt 18 | 19 | #Intellij Idea 20 | *.iml 21 | .idea/ -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d210caf8a50e1954c80690fa858572ad 3 | timeCreated: 1438295094 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/OVRDebugHeadController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 563681618daa71b4c89f979b1fd7170b 3 | timeCreated: 1433450365 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 0 12 | m_SpritePackerMode: 0 13 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Resources/Unlit Transparent Color.shader: -------------------------------------------------------------------------------- 1 | Shader "Oculus/Unlit Transparent Color" { 2 | Properties { 3 | _Color ("Main Color", Color) = (1,1,1,1) 4 | } 5 | 6 | SubShader { 7 | Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} 8 | LOD 100 9 | 10 | ZWrite Off 11 | Blend SrcAlpha OneMinusSrcAlpha 12 | Color [_Color] 13 | 14 | Pass {} 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVROnCompleteListener.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | #if UNITY_ANDROID && !UNITY_EDITOR 5 | 6 | public abstract class OVROnCompleteListener : AndroidJavaProxy 7 | { 8 | public OVROnCompleteListener() : base("com.oculus.svclib.OnCompleteListener") 9 | { 10 | } 11 | 12 | public abstract void onSuccess(); 13 | 14 | public abstract void onFailure(); 15 | } 16 | 17 | #endif -------------------------------------------------------------------------------- /Assets/Plugins/Android/libOculusMediaSurface.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f108203c87041eb41a557522bd8f0fcc 3 | timeCreated: 1437765075 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | userData: 15 | assetBundleName: 16 | assetBundleVariant: 17 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - Objects 17 | - LeftEyeOnly 18 | - RightEyeOnly 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_BounceThreshold: 2 9 | m_SleepVelocity: .150000006 10 | m_SleepAngularVelocity: .140000001 11 | m_MaxAngularVelocity: 7 12 | m_MinPenetrationForPenalty: .00999999978 13 | m_SolverIterationCount: 6 14 | m_RaycastsHitTriggers: 1 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/Startup_Sample.unity 10 | - enabled: 1 11 | path: Assets/Scenes/FirstPerson_Sample.unity 12 | - enabled: 0 13 | path: Assets/Scenes/Box_Room.unity 14 | - enabled: 0 15 | path: Assets/Scenes/Crosshair_Sample.unity 16 | - enabled: 0 17 | path: Assets/Scenes/Menu_Sample.unity 18 | - enabled: 0 19 | path: Assets/Scenes/MoviePlayer_Sample.unity 20 | - enabled: 0 21 | path: Assets/Scenes/30Hz_Sample.unity 22 | - enabled: 0 23 | path: Assets/Scenes/MultiCamera_Sample.unity 24 | - enabled: 0 25 | path: Assets/Scenes/GlobalMenu_Sample.unity 26 | - enabled: 0 27 | path: Assets/Scenes/SaveState_Sample.unity 28 | -------------------------------------------------------------------------------- /Assets/OVR/Materials/CubeMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 5 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: CubeMaterial 10 | m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | m_SavedProperties: 15 | serializedVersion: 2 16 | m_TexEnvs: 17 | data: 18 | first: 19 | name: _MainTex 20 | second: 21 | m_Texture: {fileID: 2800000, guid: 020d1a102a7f2a14ebf6cefe7b977303, type: 3} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | m_Floats: {} 25 | m_Colors: 26 | data: 27 | first: 28 | name: _Color 29 | second: {r: 1, g: 1, b: 1, a: 1} 30 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/Black.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a025c23fceb7d4966b603419f551ce99 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 2 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: 1 27 | aniso: 1 28 | mipBias: 0 29 | wrapMode: 0 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Materials/GlobalMenu/gaze_cursor.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: gaze_cursor 10 | m_Shader: {fileID: 4800000, guid: 05b53b473302943b58b8e33c93a38dac, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 2800000, guid: 077028084dceb584798dade6c58d1978, type: 3} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | m_Floats: {} 24 | m_Colors: 25 | data: 26 | first: 27 | name: _Color 28 | second: {r: 1, g: 1, b: 1, a: 1} 29 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/Logos/OculusLogo.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a56d69833b6471340bd0029e57449b72 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: 5 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_VelocityIterations: 8 9 | m_PositionIterations: 3 10 | m_VelocityThreshold: 1 11 | m_MaxLinearCorrection: .200000003 12 | m_MaxAngularCorrection: 8 13 | m_MaxTranslationSpeed: 100 14 | m_MaxRotationSpeed: 360 15 | m_BaumgarteScale: .200000003 16 | m_BaumgarteTimeOfImpactScale: .75 17 | m_TimeToSleep: .5 18 | m_LinearSleepTolerance: .00999999978 19 | m_AngularSleepTolerance: 2 20 | m_RaycastsHitTriggers: 1 21 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 22 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_LegacyDeferred: 11 | m_Mode: 1 12 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 13 | m_AlwaysIncludedShaders: 14 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 15 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 16 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 17 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 18 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 19 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 20 | m_PreloadedShaders: [] 21 | m_LightmapStripping: 0 22 | m_LightmapKeepPlain: 1 23 | m_LightmapKeepDirCombined: 1 24 | m_LightmapKeepDirSeparate: 1 25 | m_LightmapKeepDynamic: 1 26 | m_FogStripping: 0 27 | m_FogKeepLinear: 1 28 | m_FogKeepExp: 1 29 | m_FogKeepExp2: 1 30 | -------------------------------------------------------------------------------- /Assets/Plugins/OVRGamepad.bundle/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | OVRGamepad 9 | CFBundleGetInfoString 10 | 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleLongVersionString 18 | 19 | CFBundleName 20 | 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | 29 | CSResourcesFileMapped 30 | 31 | LSRequiresCarbon 32 | 33 | NSHumanReadableCopyright 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/Volume Controls/VolumeAtlas.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e12af33dddc81a840b5faf2a68953242 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | spriteMode: 0 34 | spriteExtrude: 1 35 | spriteMeshType: 1 36 | alignment: 0 37 | spritePivot: {x: .5, y: .5} 38 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 39 | spritePixelsToUnits: 100 40 | alphaIsTransparency: 1 41 | textureType: 2 42 | buildTargetSettings: [] 43 | spriteSheet: 44 | sprites: [] 45 | spritePackingTag: 46 | userData: 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | NB! Project is no longer maintained. This repository is replaced with https://github.com/taphos/vr-natural-movement 2 | 3 | 4 | Oculus Natural Movement 5 | ======================= 6 | 7 | This is an implementation of character controller which allows player to move naturally in order to control the virtual character. 8 | Made for Oculus Rift DK2, no additional hardware or sensors reuired. Steps are detected by the head movement captured by DK2 motion tracker camera. 9 | 10 | Based on Oculus SDK version 0.8 and Oculus Unity Utilities 0.1.2 11 | 12 | Controls 13 | ======== 14 | 15 | * To control the game player should stand up facing towards the DK2 motion tracker camera. 16 | * Camera should be placed about 1-2 meters in front of the player on the eye level height. 17 | * Using tripod is recommended. 18 | * Slow movements can be achieved by making small steps inside the in game marked tracker range. 19 | * Faster movements achieved by jogging in place. Steps are detected using head movements so it is better to jog hopping. It takes a bit to of practice to figure out the comfortable jogging style. 20 | 21 | Check the example game video called EvilMech Runner https://www.youtube.com/watch?v=LALSXmYQxe0 22 | 23 | Author 24 | ====== 25 | 26 | Filipp Keks -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/GlobalMenu/gaze_cursor.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 077028084dceb584798dade6c58d1978 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -3 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: -1 29 | mipBias: -1 30 | wrapMode: -1 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 1 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Materials/GlobalMenu/cursor_timer_material.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: cursor_timer_material 10 | m_Shader: {fileID: 4800000, guid: b95caf64e2cc3614892026a94bb2be84, type: 3} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 2800000, guid: 79a33e7a7166c6142ad50f46a9a23d3e, type: 3} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | data: 24 | first: 25 | name: _ColorRamp 26 | second: 27 | m_Texture: {fileID: 2800000, guid: 8929c8bc5148a624b8c9d6df0ee6f0ca, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | m_Floats: 31 | data: 32 | first: 33 | name: _Cutoff 34 | second: 1 35 | data: 36 | first: 37 | name: _ColorRampOffset 38 | second: 0 39 | m_Colors: 40 | data: 41 | first: 42 | name: _Color 43 | second: {r: 1, g: 1, b: 1, a: 1} 44 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Materials/VolumePopupMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: VolumePopupMaterial 10 | m_Shader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 2800000, guid: e12af33dddc81a840b5faf2a68953242, type: 3} 23 | m_Scale: {x: 1, y: .0625} 24 | m_Offset: {x: 0, y: .9375} 25 | m_Floats: 26 | data: 27 | first: 28 | name: _Shininess 29 | second: .699999988 30 | data: 31 | first: 32 | name: PixelSnap 33 | second: 0 34 | m_Colors: 35 | data: 36 | first: 37 | name: _Color 38 | second: {r: 1, g: 1, b: 1, a: 1} 39 | data: 40 | first: 41 | name: _SpecColor 42 | second: {r: 1, g: 1, b: 1, a: 0} 43 | data: 44 | first: 45 | name: _Emission 46 | second: {r: 0, g: 0, b: 0, a: 0} 47 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/down.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6be312efbe647294cbe64679770d9413 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -3 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/in.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0f974dc0e902634ab19dd8551dd001c 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -3 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/left.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75cc038e306c87f4cb05fcef46eacb4e 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -3 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/out.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e4c2df3800942f42a3b878664fe8544 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -3 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/up.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59f6c9038436ebc4aaf4c864fbd269e6 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -3 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/right.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4703be3cbf423a942bc24464dc2947dd 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -3 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/Icons/OculusIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee6b6c047f060074596445bbb9ebbfe7 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -3 28 | maxTextureSize: 128 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/GlobalMenu/color_ramp_timer.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8929c8bc5148a624b8c9d6df0ee6f0ca 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 0 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: 4 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: 0 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: 5 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Textures/GlobalMenu/gaze_cursor_timer.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79a33e7a7166c6142ad50f46a9a23d3e 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 0 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: 4 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: 1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: 0 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: 5 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | assetBundleVariant: 54 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Scripts/OVRTrackerMarker.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class OVRTrackerMarker : MonoBehaviour 4 | { 5 | [SerializeField] Material lineMaterial; 6 | 7 | void Start () { 8 | ResetOrientation(); 9 | Invoke("ResetOrientation", 5f); 10 | } 11 | 12 | void Update () { 13 | UpdateMarker(); 14 | } 15 | 16 | void UpdateMarker() 17 | { 18 | var frustum = OVRManager.tracker.frustum; 19 | float horizontalScale = frustum.fov.x / 100f; 20 | float verticalScale = frustum.fov.y / 100f; 21 | transform.localScale = new Vector3(horizontalScale * frustum.farZ, verticalScale * frustum.farZ, frustum.farZ); 22 | } 23 | 24 | public void ResetOrientation() 25 | { 26 | OVRManager.display.RecenterPose(); 27 | } 28 | 29 | void OnRenderObject() 30 | { 31 | lineMaterial.SetPass(0); 32 | 33 | GL.PushMatrix(); 34 | GL.MultMatrix(transform.localToWorldMatrix); 35 | GL.Begin(GL.LINES); 36 | GL.Color(Color.red); 37 | 38 | GL.Vertex(Vector3.zero); 39 | GL.Vertex(new Vector3(1, 1, 1)); 40 | 41 | GL.Vertex(Vector3.zero); 42 | GL.Vertex(new Vector3(-1, 1, 1)); 43 | 44 | GL.Vertex(Vector3.zero); 45 | GL.Vertex(new Vector3(1, -1, 1)); 46 | 47 | GL.Vertex(Vector3.zero); 48 | GL.Vertex(new Vector3(-1, -1, 1)); 49 | 50 | GL.End(); 51 | GL.PopMatrix(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Assets/OVR/Textures/cube_texture.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 020d1a102a7f2a14ebf6cefe7b977303 3 | timeCreated: 1425942022 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRWaitCursor.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | 24 | /// 25 | /// Rotates this GameObject at a given speed. 26 | /// 27 | public class OVRWaitCursor : MonoBehaviour 28 | { 29 | public Vector3 rotateSpeeds = new Vector3(0.0f, 0.0f, -60.0f); 30 | 31 | /// 32 | /// Auto rotates the attached cursor. 33 | /// 34 | void Update() 35 | { 36 | transform.Rotate(rotateSpeeds * Time.smoothDeltaTime); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Scripts/Tutor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class Tutor : MonoBehaviour 5 | { 6 | [SerializeField] OVRTrackerMarker cameraMarker; 7 | [SerializeField] OVRNaturalMovementController motionController; 8 | 9 | [System.NonSerialized] TextMesh textMesh; 10 | bool spacePressed; 11 | 12 | IEnumerator Start () { 13 | textMesh = GetComponent(); 14 | Message("THIS GAME IS MEANT TO BE PLAYED STANDING\nHIT SPACE TO PROCEED"); 15 | yield return StartCoroutine(WaitForSpace()); 16 | 17 | Message("CALIBRATING\nLOOK AT POSITION TRACKER AND HIT SPACE"); 18 | yield return StartCoroutine(WaitForSpace()); 19 | 20 | cameraMarker.ResetOrientation(); 21 | motionController.ResetRotation(); 22 | Message("THE RED BOX IS A TRACKER RANGE\nMAKE A COUPLE OF STEPS INSIDE THE BOX\nDONT STEP OUT OF IT"); 23 | yield return StartCoroutine(WaitForSpace()); 24 | 25 | Message("JOG IN PLACE TO MOVE FASTER\nSTEPS DETECTED BY HEAD MOTION"); 26 | yield return StartCoroutine(WaitForSpace()); 27 | 28 | Message("OMG YOU ARE MOVING!"); 29 | yield return new WaitForSeconds(5); 30 | Message(""); 31 | } 32 | 33 | IEnumerator WaitForSpace() { 34 | while (!spacePressed) yield return new WaitForEndOfFrame(); 35 | spacePressed = false; 36 | } 37 | 38 | void Update() 39 | { 40 | if (Input.GetKeyUp(KeyCode.Space)) spacePressed = true; 41 | if (Input.GetKeyDown(KeyCode.R)) { 42 | cameraMarker.ResetOrientation(); 43 | motionController.ResetRotation(); 44 | } 45 | if (Input.GetKey(KeyCode.Escape)) Application.Quit(); 46 | } 47 | 48 | public void Message(string text) 49 | { 50 | textMesh.text = text; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/OVR/Editor/OVRBuild.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using UnityEditor; 24 | 25 | /// 26 | /// Allows Oculus to build apps from the command line. 27 | /// 28 | partial class OculusBuildApp 29 | { 30 | static void SetAndroidTarget() 31 | { 32 | #if UNITY_5 33 | EditorUserBuildSettings.androidBuildSubtarget = MobileTextureSubtarget.ASTC; 34 | #else 35 | EditorUserBuildSettings.androidBuildSubtarget = AndroidBuildSubtarget.ETC2; 36 | #endif 37 | if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android) 38 | { 39 | EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.Android); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Assets/OVR/Materials/Arrow.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Arrow 10 | m_Shader: {fileID: 10101, guid: 0000000000000000e000000000000000, type: 0} 11 | m_ShaderKeywords: [] 12 | m_CustomRenderQueue: -1 13 | m_SavedProperties: 14 | serializedVersion: 2 15 | m_TexEnvs: 16 | data: 17 | first: 18 | name: _MainTex 19 | second: 20 | m_Texture: {fileID: 0} 21 | m_Scale: {x: 1, y: 1} 22 | m_Offset: {x: 0, y: 0} 23 | m_Floats: 24 | data: 25 | first: 26 | name: _Shininess 27 | second: .699999988 28 | data: 29 | first: 30 | name: _Stencil 31 | second: 0 32 | data: 33 | first: 34 | name: _StencilReadMask 35 | second: 255 36 | data: 37 | first: 38 | name: _StencilWriteMask 39 | second: 255 40 | data: 41 | first: 42 | name: _StencilComp 43 | second: 8 44 | data: 45 | first: 46 | name: _StencilOp 47 | second: 1 48 | data: 49 | first: 50 | name: _ColorMask 51 | second: 15 52 | m_Colors: 53 | data: 54 | first: 55 | name: _Color 56 | second: {r: 1, g: 0, b: 0, a: 1} 57 | data: 58 | first: 59 | name: _Emission 60 | second: {r: 0, g: 0, b: 0, a: 0} 61 | data: 62 | first: 63 | name: _SpecColor 64 | second: {r: 1, g: 1, b: 1, a: 1} 65 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Shaders/Unlit Crosshair.shader: -------------------------------------------------------------------------------- 1 | // Unlit alpha-blended shader. 2 | // - no lighting 3 | // - no lightmap support 4 | // - supports tint color 5 | 6 | Shader "Unlit/Crosshair" { 7 | 8 | Properties 9 | { 10 | _MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {} 11 | _Color ("Main Color", Color) = (0.5,0.5,0.5,0.5) 12 | } 13 | 14 | SubShader 15 | { 16 | LOD 100 17 | 18 | Tags 19 | { 20 | "Queue" = "Transparent" 21 | "IgnoreProjector" = "True" 22 | "RenderType" = "Transparent" 23 | } 24 | 25 | Cull Off 26 | Lighting Off 27 | ZTest Always 28 | ZWrite Off 29 | Fog { Mode Off } 30 | Offset -1, -1 31 | Blend SrcAlpha OneMinusSrcAlpha 32 | 33 | Pass 34 | { 35 | CGPROGRAM 36 | #pragma vertex vert 37 | #pragma fragment frag 38 | 39 | #include "UnityCG.cginc" 40 | 41 | struct appdata_t 42 | { 43 | float4 vertex : POSITION; 44 | float2 texcoord : TEXCOORD0; 45 | fixed4 color : COLOR; 46 | }; 47 | 48 | struct v2f 49 | { 50 | float4 vertex : SV_POSITION; 51 | half2 texcoord : TEXCOORD0; 52 | fixed4 color : COLOR; 53 | }; 54 | 55 | sampler2D _MainTex; 56 | float4 _MainTex_ST; 57 | fixed4 _Color; 58 | 59 | v2f vert (appdata_t v) 60 | { 61 | v2f o; 62 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 63 | o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); 64 | o.color = v.color; 65 | return o; 66 | } 67 | 68 | fixed4 frag (v2f i) : COLOR 69 | { 70 | fixed4 col = tex2D(_MainTex, i.texcoord) * i.color * _Color * 2.0; 71 | return col; 72 | } 73 | ENDCG 74 | } 75 | } 76 | 77 | 78 | } 79 | 80 | -------------------------------------------------------------------------------- /Assets/Plugins/x86/OVRGamepad.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e56ddaca255fa724ea4a5d22fc059d6e 3 | PluginImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | isPreloaded: 0 8 | platformData: 9 | Android: 10 | enabled: 0 11 | settings: 12 | CPU: AnyCPU 13 | Any: 14 | enabled: 0 15 | settings: {} 16 | Editor: 17 | enabled: 1 18 | settings: 19 | CPU: x86 20 | DefaultValueInitialized: true 21 | OS: Windows 22 | Linux: 23 | enabled: 0 24 | settings: 25 | CPU: x86 26 | Linux64: 27 | enabled: 0 28 | settings: 29 | CPU: None 30 | LinuxUniversal: 31 | enabled: 0 32 | settings: 33 | CPU: None 34 | OSXIntel: 35 | enabled: 0 36 | settings: 37 | CPU: AnyCPU 38 | OSXIntel64: 39 | enabled: 0 40 | settings: 41 | CPU: None 42 | OSXUniversal: 43 | enabled: 0 44 | settings: 45 | CPU: None 46 | SamsungTV: 47 | enabled: 0 48 | settings: 49 | STV_MODEL: STANDARD_13 50 | WP8: 51 | enabled: 0 52 | settings: 53 | CPU: AnyCPU 54 | DontProcess: False 55 | PlaceholderPath: 56 | Win: 57 | enabled: 1 58 | settings: 59 | CPU: AnyCPU 60 | Win64: 61 | enabled: 0 62 | settings: 63 | CPU: None 64 | WindowsStoreApps: 65 | enabled: 0 66 | settings: 67 | CPU: AnyCPU 68 | DontProcess: False 69 | PlaceholderPath: 70 | SDK: AnySDK 71 | iOS: 72 | enabled: 0 73 | settings: 74 | CompileFlags: 75 | FrameworkDependencies: 76 | userData: 77 | assetBundleName: 78 | assetBundleVariant: 79 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Shaders/OVRColorRampAlpha.shader: -------------------------------------------------------------------------------- 1 | Shader "OVRColorRampAlpa" { 2 | Properties { 3 | _Color ("Main Color", Color ) = (1,1,1,1) 4 | _MainTex ("Diffuse (RGB) AlphaMask (A)", 2D) = "white" {} 5 | _ColorRamp ("Color Ramp (A)", 2D) = "white" {} 6 | _ColorRampOffset ("Color Ramp Offset", Range(0,1)) = 0.0 7 | } 8 | 9 | Category { 10 | Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} 11 | Blend SrcAlpha OneMinusSrcAlpha 12 | AlphaTest Greater .01 13 | ColorMask RGB 14 | Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) } 15 | 16 | SubShader { 17 | Pass { 18 | CGPROGRAM 19 | 20 | #pragma vertex vert 21 | #pragma fragment frag 22 | 23 | #include "UnityCG.cginc" 24 | 25 | sampler2D _MainTex; 26 | sampler2D _ColorRamp; 27 | float _ColorRampOffset; 28 | fixed4 _Color; 29 | 30 | struct appdata_t { 31 | float4 vertex : POSITION; 32 | fixed4 color : COLOR; 33 | float2 texcoord : TEXCOORD0; 34 | }; 35 | 36 | struct v2f { 37 | float4 vertex : SV_POSITION; 38 | fixed4 color : COLOR; 39 | float2 texcoord : TEXCOORD0; 40 | }; 41 | 42 | float4 _MainTex_ST; 43 | 44 | v2f vert(appdata_t v) { 45 | v2f o; 46 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 47 | o.color = v.color; 48 | o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); 49 | return o; 50 | } 51 | 52 | fixed4 frag(v2f i) : SV_Target { 53 | float4 texel = tex2D(_MainTex, i.texcoord); 54 | float2 colorIndex = float2( texel.x, _ColorRampOffset ); 55 | float4 outColor = tex2D(_ColorRamp, colorIndex) * _Color; 56 | outColor.a = texel.a; 57 | return outColor; 58 | } 59 | ENDCG 60 | } 61 | } 62 | } 63 | } // Category -------------------------------------------------------------------------------- /Assets/Plugins/x86_64/OVRGamepad.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a932a8ce6eed5ac459fef6ebccd46c84 3 | PluginImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | isPreloaded: 0 8 | platformData: 9 | Android: 10 | enabled: 0 11 | settings: 12 | CPU: AnyCPU 13 | Any: 14 | enabled: 0 15 | settings: {} 16 | Editor: 17 | enabled: 1 18 | settings: 19 | CPU: x86_64 20 | DefaultValueInitialized: true 21 | OS: Windows 22 | Linux: 23 | enabled: 0 24 | settings: 25 | CPU: None 26 | Linux64: 27 | enabled: 0 28 | settings: 29 | CPU: x86_64 30 | LinuxUniversal: 31 | enabled: 0 32 | settings: 33 | CPU: None 34 | OSXIntel: 35 | enabled: 0 36 | settings: 37 | CPU: None 38 | OSXIntel64: 39 | enabled: 0 40 | settings: 41 | CPU: AnyCPU 42 | OSXUniversal: 43 | enabled: 0 44 | settings: 45 | CPU: None 46 | SamsungTV: 47 | enabled: 0 48 | settings: 49 | STV_MODEL: STANDARD_13 50 | WP8: 51 | enabled: 0 52 | settings: 53 | CPU: AnyCPU 54 | DontProcess: False 55 | PlaceholderPath: 56 | Win: 57 | enabled: 0 58 | settings: 59 | CPU: None 60 | Win64: 61 | enabled: 1 62 | settings: 63 | CPU: AnyCPU 64 | WindowsStoreApps: 65 | enabled: 0 66 | settings: 67 | CPU: AnyCPU 68 | DontProcess: False 69 | PlaceholderPath: 70 | SDK: AnySDK 71 | iOS: 72 | enabled: 0 73 | settings: 74 | CompileFlags: 75 | FrameworkDependencies: 76 | userData: 77 | assetBundleName: 78 | assetBundleVariant: 79 | -------------------------------------------------------------------------------- /Assets/Plugins/OVRGamepad.bundle.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21b567b84a15d0c4da39b709bc231d39 3 | folderAsset: yes 4 | timeCreated: 1441326310 5 | licenseType: Pro 6 | PluginImporter: 7 | serializedVersion: 1 8 | iconMap: {} 9 | executionOrder: {} 10 | isPreloaded: 0 11 | platformData: 12 | Android: 13 | enabled: 0 14 | settings: 15 | CPU: AnyCPU 16 | Any: 17 | enabled: 0 18 | settings: {} 19 | Editor: 20 | enabled: 1 21 | settings: 22 | CPU: AnyCPU 23 | DefaultValueInitialized: true 24 | OS: OSX 25 | Linux: 26 | enabled: 0 27 | settings: 28 | CPU: x86 29 | Linux64: 30 | enabled: 0 31 | settings: 32 | CPU: x86_64 33 | LinuxUniversal: 34 | enabled: 0 35 | settings: 36 | CPU: None 37 | OSXIntel: 38 | enabled: 1 39 | settings: 40 | CPU: AnyCPU 41 | OSXIntel64: 42 | enabled: 1 43 | settings: 44 | CPU: AnyCPU 45 | OSXUniversal: 46 | enabled: 1 47 | settings: 48 | CPU: AnyCPU 49 | SamsungTV: 50 | enabled: 0 51 | settings: 52 | STV_MODEL: STANDARD_13 53 | WP8: 54 | enabled: 0 55 | settings: 56 | CPU: AnyCPU 57 | DontProcess: False 58 | PlaceholderPath: 59 | Win: 60 | enabled: 1 61 | settings: 62 | CPU: AnyCPU 63 | Win64: 64 | enabled: 1 65 | settings: 66 | CPU: AnyCPU 67 | WindowsStoreApps: 68 | enabled: 0 69 | settings: 70 | CPU: AnyCPU 71 | DontProcess: False 72 | PlaceholderPath: 73 | SDK: AnySDK 74 | iOS: 75 | enabled: 0 76 | settings: 77 | CompileFlags: 78 | FrameworkDependencies: 79 | userData: 80 | assetBundleName: 81 | assetBundleVariant: 82 | -------------------------------------------------------------------------------- /Assets/OVR/Meshes/Cone.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c28fa8d61f81fb742b1180a6d4516625 3 | ModelImporter: 4 | serializedVersion: 16 5 | fileIDToRecycleName: 6 | 100000: //RootNode 7 | 100002: Mesh1_Model 8 | 400000: //RootNode 9 | 400002: Mesh1_Model 10 | 2300000: Mesh1_Model 11 | 3300000: Mesh1_Model 12 | 4300000: Mesh1_Model 13 | 9500000: //RootNode 14 | materials: 15 | importMaterials: 0 16 | materialName: 0 17 | materialSearch: 1 18 | animations: 19 | legacyGenerateAnimations: 4 20 | bakeSimulation: 0 21 | optimizeGameObjects: 0 22 | motionNodeName: 23 | animationCompression: 1 24 | animationRotationError: .5 25 | animationPositionError: .5 26 | animationScaleError: .5 27 | animationWrapMode: 0 28 | extraExposedTransformPaths: [] 29 | clipAnimations: [] 30 | isReadable: 1 31 | meshes: 32 | lODScreenPercentages: [] 33 | globalScale: 1 34 | meshCompression: 0 35 | addColliders: 0 36 | importBlendShapes: 1 37 | swapUVChannels: 0 38 | generateSecondaryUV: 0 39 | useFileUnits: 1 40 | optimizeMeshForGPU: 1 41 | weldVertices: 1 42 | secondaryUVAngleDistortion: 8 43 | secondaryUVAreaDistortion: 15.000001 44 | secondaryUVHardAngle: 88 45 | secondaryUVPackMargin: 4 46 | tangentSpace: 47 | normalSmoothAngle: 90 48 | splitTangentsAcrossUV: 0 49 | normalImportMode: 0 50 | tangentImportMode: 1 51 | importAnimation: 1 52 | copyAvatar: 0 53 | humanDescription: 54 | human: [] 55 | skeleton: [] 56 | armTwist: .5 57 | foreArmTwist: .5 58 | upperLegTwist: .5 59 | legTwist: .5 60 | armStretch: .0500000007 61 | legStretch: .0500000007 62 | feetSpacing: 0 63 | rootMotionBoneName: 64 | lastHumanDescriptionAvatarSource: {instanceID: 0} 65 | animationType: 2 66 | additionalBone: 0 67 | userData: 68 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRResetOrientation.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | 24 | /// 25 | /// Allows you to reset VR input tracking with a gamepad button press. 26 | /// 27 | public class OVRResetOrientation : MonoBehaviour 28 | { 29 | /// 30 | /// The gamepad button that will reset VR input tracking. 31 | /// 32 | public OVRGamepadController.Button resetButton = OVRGamepadController.Button.Y; 33 | 34 | /// 35 | /// Check input and reset orientation if necessary 36 | /// See the input mapping setup in the Unity Integration guide 37 | /// 38 | void Update() 39 | { 40 | // NOTE: some of the buttons defined in OVRGamepadController.Button are not available on the Android game pad controller 41 | if (OVRGamepadController.GPC_GetButtonDown(resetButton)) 42 | { 43 | //************************* 44 | // reset orientation 45 | //************************* 46 | OVRManager.display.RecenterPose(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRMonoscopic.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | 24 | /// 25 | /// Allows you to toggle monoscopic rendering with a gamepad button press. 26 | /// 27 | public class OVRMonoscopic : MonoBehaviour 28 | { 29 | /// 30 | /// The gamepad button that will toggle monoscopic rendering. 31 | /// 32 | public OVRGamepadController.Button toggleButton = OVRGamepadController.Button.B; 33 | 34 | private bool monoscopic = false; 35 | 36 | /// 37 | /// Check input and toggle monoscopic rendering mode if necessary 38 | /// See the input mapping setup in the Unity Integration guide 39 | /// 40 | void Update() 41 | { 42 | // NOTE: some of the buttons defined in OVRGamepadController.Button are not available on the Android game pad controller 43 | if (OVRGamepadController.GPC_GetButtonDown(toggleButton)) 44 | { 45 | //************************* 46 | // toggle monoscopic rendering mode 47 | //************************* 48 | monoscopic = !monoscopic; 49 | OVRManager.instance.monoscopic = monoscopic; 50 | } 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Prefabs/GlobalMenu/Cursor_Timer.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100000 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 400000} 11 | - 33: {fileID: 3300000} 12 | - 23: {fileID: 2300000} 13 | m_Layer: 0 14 | m_Name: Cursor_Timer 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &400000 21 | Transform: 22 | m_ObjectHideFlags: 1 23 | m_PrefabParentObject: {fileID: 0} 24 | m_PrefabInternal: {fileID: 100100000} 25 | m_GameObject: {fileID: 100000} 26 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 27 | m_LocalPosition: {x: 0, y: 1.70000005, z: 1} 28 | m_LocalScale: {x: .25, y: .25, z: 1} 29 | m_Children: [] 30 | m_Father: {fileID: 0} 31 | m_RootOrder: 0 32 | --- !u!23 &2300000 33 | Renderer: 34 | m_ObjectHideFlags: 1 35 | m_PrefabParentObject: {fileID: 0} 36 | m_PrefabInternal: {fileID: 100100000} 37 | m_GameObject: {fileID: 100000} 38 | m_Enabled: 1 39 | m_CastShadows: 0 40 | m_ReceiveShadows: 0 41 | m_LightmapIndex: 255 42 | m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} 43 | m_Materials: 44 | - {fileID: 2100000, guid: 9531aa878fd5c4749b288b72024e8d2f, type: 2} 45 | m_SubsetIndices: 46 | m_StaticBatchRoot: {fileID: 0} 47 | m_UseLightProbes: 0 48 | m_LightProbeAnchor: {fileID: 0} 49 | m_ScaleInLightmap: 1 50 | m_SortingLayerID: 0 51 | m_SortingOrder: 0 52 | --- !u!33 &3300000 53 | MeshFilter: 54 | m_ObjectHideFlags: 1 55 | m_PrefabParentObject: {fileID: 0} 56 | m_PrefabInternal: {fileID: 100100000} 57 | m_GameObject: {fileID: 100000} 58 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 59 | --- !u!1001 &100100000 60 | Prefab: 61 | m_ObjectHideFlags: 1 62 | serializedVersion: 2 63 | m_Modification: 64 | m_TransformParent: {fileID: 0} 65 | m_Modifications: [] 66 | m_RemovedComponents: [] 67 | m_ParentPrefab: {fileID: 0} 68 | m_RootGameObject: {fileID: 100000} 69 | m_IsPrefabParent: 1 70 | m_IsExploded: 1 71 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRChromaticAberration.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | 24 | /// 25 | /// Allows you to toggle chromatic aberration correction with a gamepad button press. 26 | /// 27 | public class OVRChromaticAberration : MonoBehaviour 28 | { 29 | /// 30 | /// The button that will toggle chromatic aberration correction. 31 | /// 32 | public OVRGamepadController.Button toggleButton = OVRGamepadController.Button.X; 33 | 34 | private bool chromatic = false; 35 | 36 | void Start () 37 | { 38 | // Enable/Disable Chromatic Aberration Correction. 39 | // NOTE: Enabling Chromatic Aberration for mobile has a large performance cost. 40 | OVRManager.instance.chromatic = chromatic; 41 | } 42 | 43 | void Update() 44 | { 45 | // NOTE: some of the buttons defined in OVRGamepadController.Button are not available on the Android game pad controller 46 | if (OVRGamepadController.GPC_GetButtonDown(toggleButton)) 47 | { 48 | //************************* 49 | // toggle chromatic aberration correction 50 | //************************* 51 | chromatic = !chromatic; 52 | OVRManager.instance.chromatic = chromatic; 53 | } 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Resources/OVRVolumeController.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100000 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 400000} 11 | - 33: {fileID: 3300000} 12 | - 23: {fileID: 2300000} 13 | - 114: {fileID: 11400000} 14 | m_Layer: 0 15 | m_Name: OVRVolumeController 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &400000 22 | Transform: 23 | m_ObjectHideFlags: 1 24 | m_PrefabParentObject: {fileID: 0} 25 | m_PrefabInternal: {fileID: 100100000} 26 | m_GameObject: {fileID: 100000} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 0, y: 1, z: 1} 29 | m_LocalScale: {x: .550000012, y: .118000001, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | --- !u!23 &2300000 34 | Renderer: 35 | m_ObjectHideFlags: 1 36 | m_PrefabParentObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | m_GameObject: {fileID: 100000} 39 | m_Enabled: 1 40 | m_CastShadows: 0 41 | m_ReceiveShadows: 0 42 | m_LightmapIndex: 255 43 | m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} 44 | m_Materials: 45 | - {fileID: 2100000, guid: 2f63cb594c65fd54ba6388679c4a8b4a, type: 2} 46 | m_SubsetIndices: 47 | m_StaticBatchRoot: {fileID: 0} 48 | m_UseLightProbes: 0 49 | m_LightProbeAnchor: {fileID: 0} 50 | m_ScaleInLightmap: 1 51 | m_SortingLayerID: 0 52 | m_SortingOrder: 0 53 | --- !u!33 &3300000 54 | MeshFilter: 55 | m_ObjectHideFlags: 1 56 | m_PrefabParentObject: {fileID: 0} 57 | m_PrefabInternal: {fileID: 100100000} 58 | m_GameObject: {fileID: 100000} 59 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 60 | --- !u!114 &11400000 61 | MonoBehaviour: 62 | m_ObjectHideFlags: 1 63 | m_PrefabParentObject: {fileID: 0} 64 | m_PrefabInternal: {fileID: 100100000} 65 | m_GameObject: {fileID: 100000} 66 | m_Enabled: 1 67 | m_EditorHideFlags: 0 68 | m_Script: {fileID: 11500000, guid: 84ef17b01bf63784d89787adc8cb1256, type: 3} 69 | m_Name: 70 | m_EditorClassIdentifier: 71 | --- !u!1001 &100100000 72 | Prefab: 73 | m_ObjectHideFlags: 1 74 | serializedVersion: 2 75 | m_Modification: 76 | m_TransformParent: {fileID: 0} 77 | m_Modifications: [] 78 | m_RemovedComponents: [] 79 | m_ParentPrefab: {fileID: 0} 80 | m_RootGameObject: {fileID: 100000} 81 | m_IsPrefabParent: 1 82 | m_IsExploded: 1 83 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/OVRVolumeControl.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using System.Collections; 24 | 25 | /// 26 | /// An on-screen display that shows the current system audio volume. 27 | /// 28 | public class OVRVolumeControl : MonoBehaviour 29 | { 30 | private const float showPopupTime = 3; 31 | private const float popupOffsetY = 64.0f / 500.0f; 32 | private const float popupDepth = 1.8f; 33 | private const int maxVolume = 15; 34 | private const int numVolumeImages = maxVolume + 1; 35 | 36 | private Transform myTransform = null; 37 | private double lastVolumeChange = double.NegativeInfinity; 38 | private float prevVolumeLevel = -1; 39 | 40 | void Start() 41 | { 42 | DontDestroyOnLoad( gameObject ); 43 | myTransform = transform; 44 | GetComponent().enabled = false; 45 | 46 | } 47 | 48 | /// 49 | /// Updates the position of the volume popup. 50 | /// 51 | public virtual void UpdatePosition(Transform cameraTransform) 52 | { 53 | if (prevVolumeLevel == -1) 54 | prevVolumeLevel = OVRManager.volumeLevel; 55 | 56 | if (prevVolumeLevel != OVRManager.volumeLevel) 57 | { 58 | prevVolumeLevel = OVRManager.volumeLevel; 59 | lastVolumeChange = Time.time; 60 | } 61 | 62 | if (Time.time - lastVolumeChange < showPopupTime) 63 | { 64 | GetComponent().enabled = true; 65 | int volume = (int)(OVRManager.volumeLevel * 15.0f + 0.5f); 66 | GetComponent().material.mainTextureOffset = new Vector2(0.0f, (float)(maxVolume - volume) / (float)numVolumeImages); 67 | if (myTransform != null && cameraTransform != null) 68 | { 69 | // place in front of camera 70 | myTransform.rotation = cameraTransform.rotation; 71 | myTransform.position = cameraTransform.position + (myTransform.forward * popupDepth) + (myTransform.up * popupOffsetY); 72 | } 73 | } 74 | else 75 | { 76 | GetComponent().enabled = false; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRModeParms.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using VR = UnityEngine.VR; 24 | 25 | /// 26 | /// Logs when the application enters power save mode and allows you to a low-power CPU/GPU level with a button press. 27 | /// 28 | public class OVRModeParms : MonoBehaviour 29 | { 30 | #region Member Variables 31 | 32 | /// 33 | /// The gamepad button that will switch the application to CPU level 0 and GPU level 1. 34 | /// 35 | public OVRGamepadController.Button resetButton = OVRGamepadController.Button.X; 36 | 37 | #endregion 38 | 39 | /// 40 | /// Invoke power state mode test. 41 | /// 42 | void Start() 43 | { 44 | if (!OVRManager.isHmdPresent) 45 | { 46 | enabled = false; 47 | return; 48 | } 49 | 50 | // Call TestPowerLevelState after 10 seconds 51 | // and repeats every 10 seconds. 52 | InvokeRepeating ( "TestPowerStateMode", 10, 10.0f ); 53 | } 54 | 55 | /// 56 | /// Change default vr mode parms dynamically. 57 | /// 58 | void Update() 59 | { 60 | // NOTE: some of the buttons defined in OVRGamepadController.Button are not available on the Android game pad controller 61 | if ( OVRGamepadController.GPC_GetButtonDown(resetButton)) 62 | { 63 | //************************* 64 | // Dynamically change VrModeParms cpu and gpu level. 65 | // NOTE: Reset will cause 1 frame of flicker as it leaves 66 | // and re-enters Vr mode. 67 | //************************* 68 | OVRPlugin.cpuLevel = 0; 69 | OVRPlugin.gpuLevel = 1; 70 | } 71 | } 72 | 73 | /// 74 | /// Check current power state mode. 75 | /// 76 | void TestPowerStateMode() 77 | { 78 | //************************* 79 | // Check power-level state mode 80 | //************************* 81 | if (OVRPlugin.powerSaving) 82 | { 83 | // The device has been throttled 84 | Debug.Log("POWER SAVE MODE ACTIVATED"); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Scripts/OVRNaturalMovementController.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | [RequireComponent(typeof(CapsuleCollider))] 4 | public class OVRNaturalMovementController : MonoBehaviour 5 | { 6 | OVRCameraRig rig; 7 | 8 | Quaternion lastRotation; 9 | Vector3 lastPosition; 10 | 11 | void Start() 12 | { 13 | rig = GetComponentInChildren(); 14 | neckToEye = new Vector3(0, OVRManager.profile.eyeHeight - OVRManager.profile.neckHeight, OVRManager.profile.eyeDepth); 15 | rig.transform.localPosition = Vector3.up * OVRManager.profile.eyeHeight; 16 | } 17 | 18 | Vector3 neckToEye; 19 | 20 | float velocity; 21 | 22 | void Update() 23 | { 24 | UpdateNaturalMovement(); 25 | UpdateKeyboardMovement(); 26 | UpdateCollider(); 27 | } 28 | 29 | void UpdateKeyboardMovement() 30 | { 31 | #if UNITY_EDITOR 32 | if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.UpArrow)) transform.position += transform.rotation * Vector3.forward * Time.deltaTime * 10; 33 | if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow)) transform.position += transform.rotation * Vector3.left * Time.deltaTime * 10; 34 | if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow)) transform.position += transform.rotation * Vector3.right * Time.deltaTime * 10; 35 | if (Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow)) transform.position += transform.rotation * Vector3.back * Time.deltaTime * 10; 36 | transform.Rotate(Vector3.up * Input.GetAxis("Mouse X") * 100 * Time.deltaTime); 37 | #endif 38 | } 39 | 40 | public void ResetRotation() 41 | { 42 | transform.rotation = Quaternion.Euler(Vector3.up * 90); 43 | } 44 | 45 | void UpdateNaturalMovement() 46 | { 47 | // compensate the vertical movement of the head made by nodding 48 | var rotPositionChange = rig.centerEyeAnchor.localRotation * neckToEye - lastRotation * neckToEye; 49 | var rotCompensation = Mathf.Abs(rotPositionChange.y); 50 | 51 | var yChange = rig.centerEyeAnchor.localPosition.y - lastPosition.y; 52 | 53 | var desiredVelocity = Time.deltaTime > 0 ? (Mathf.Abs(yChange) - rotCompensation) * 5 / Time.deltaTime : 0; 54 | velocity = Mathf.Lerp(velocity, desiredVelocity, Time.deltaTime * 5); 55 | 56 | var lookDirection = rig.centerEyeAnchor.localRotation * Vector3.forward; 57 | var moveDirection = new Vector3(lookDirection.x, 0, lookDirection.z).normalized; 58 | var move = moveDirection * velocity * Time.deltaTime; 59 | 60 | transform.position += transform.rotation * move; 61 | 62 | lastPosition = rig.centerEyeAnchor.localPosition; 63 | lastRotation = rig.centerEyeAnchor.localRotation; 64 | } 65 | 66 | void UpdateCollider() 67 | { 68 | var cc = ((CapsuleCollider)GetComponent()); 69 | var center = cc.center; 70 | 71 | // if no obstacles on the way move collider together with camera 72 | if (Mathf.Abs(GetComponent().velocity.x) < 0.001f && Mathf.Abs(GetComponent().velocity.z) < 0.001f) 73 | center = rig.centerEyeAnchor.localPosition; 74 | 75 | var height = rig.centerEyeAnchor.localPosition.y + OVRManager.profile.eyeHeight; 76 | center.y = height / 2; 77 | cc.center = Vector3.Lerp(cc.center, center, Time.deltaTime); 78 | cc.height = cc.center.y * 2; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/Utils/OVRDebugGraph.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using VR = UnityEngine.VR; 24 | 25 | /// 26 | /// Toggles an on-screen debug graph with VR rendering and performance statistics. 27 | /// 28 | public class OVRDebugGraph : MonoBehaviour 29 | { 30 | public enum DebugPerfMode 31 | { 32 | DEBUG_PERF_OFF, // data still being collected, just not displayed 33 | DEBUG_PERF_RUNNING, // display continuously changing graph 34 | DEBUG_PERF_FROZEN, // no new data collection, but displayed 35 | DEBUG_PERF_MAX, 36 | } 37 | 38 | /// 39 | /// The current display mode. 40 | /// 41 | public DebugPerfMode debugMode = DebugPerfMode.DEBUG_PERF_OFF; 42 | 43 | /// 44 | /// The gamepad button that will toggle the display mode. 45 | /// 46 | public OVRGamepadController.Button toggleButton = OVRGamepadController.Button.Start; 47 | 48 | /// 49 | /// Initialize the debug mode 50 | /// 51 | void Start() 52 | { 53 | if (!OVRManager.isHmdPresent) 54 | { 55 | enabled = false; 56 | return; 57 | } 58 | 59 | OVRPlugin.debugDisplay = (debugMode != DebugPerfMode.DEBUG_PERF_OFF); 60 | OVRPlugin.collectPerf = (debugMode != DebugPerfMode.DEBUG_PERF_FROZEN); 61 | } 62 | 63 | /// 64 | /// Check input and toggle the debug graph. 65 | /// See the input mapping setup in the Unity Integration guide. 66 | /// 67 | void Update() 68 | { 69 | // NOTE: some of the buttons defined in OVRGamepadController.Button are not available on the Android game pad controller 70 | if (OVRGamepadController.GPC_GetButtonDown( toggleButton )) 71 | { 72 | Debug.Log(" TOGGLE GRAPH "); 73 | 74 | //************************* 75 | // toggle the debug graph .. off -> running -> paused 76 | //************************* 77 | switch (debugMode) 78 | { 79 | case DebugPerfMode.DEBUG_PERF_OFF: 80 | debugMode = DebugPerfMode.DEBUG_PERF_RUNNING; 81 | break; 82 | case DebugPerfMode.DEBUG_PERF_RUNNING: 83 | debugMode = DebugPerfMode.DEBUG_PERF_FROZEN; 84 | break; 85 | case DebugPerfMode.DEBUG_PERF_FROZEN: 86 | debugMode = DebugPerfMode.DEBUG_PERF_OFF; 87 | break; 88 | } 89 | 90 | // Turn on/off debug graph 91 | OVRPlugin.debugDisplay = (debugMode != DebugPerfMode.DEBUG_PERF_OFF); 92 | OVRPlugin.collectPerf = (debugMode == DebugPerfMode.DEBUG_PERF_FROZEN); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Editor/OVRMoonlightLoader.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using UnityEditor; 24 | using UnityEditor.Callbacks; 25 | using System; 26 | using System.Linq; 27 | using System.Text.RegularExpressions; 28 | using System.IO; 29 | 30 | [InitializeOnLoad] 31 | class OVRMoonlightLoader 32 | { 33 | static OVRMoonlightLoader() 34 | { 35 | var mgrs = GameObject.FindObjectsOfType().Where(m => m.isActiveAndEnabled); 36 | 37 | EditorApplication.update += EnforceBundleId; 38 | 39 | if (mgrs.Count() != 0 && !PlayerSettings.virtualRealitySupported) 40 | { 41 | Debug.Log("Enabling Unity VR support"); 42 | PlayerSettings.virtualRealitySupported = true; 43 | } 44 | 45 | if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android) 46 | return; 47 | 48 | if (PlayerSettings.defaultInterfaceOrientation != UIOrientation.LandscapeLeft) 49 | { 50 | Debug.Log("MoonlightLoader: Setting orientation to Landscape Left"); 51 | // Default screen orientation must be set to landscape left. 52 | PlayerSettings.defaultInterfaceOrientation = UIOrientation.LandscapeLeft; 53 | } 54 | 55 | if (!PlayerSettings.virtualRealitySupported) 56 | { 57 | // NOTE: This value should not affect the main window surface 58 | // when Built-in VR support is enabled. 59 | 60 | // NOTE: On Adreno Lollipop, it is an error to have antiAliasing set on the 61 | // main window surface with front buffer rendering enabled. The view will 62 | // render black. 63 | // On Adreno KitKat, some tiling control modes will cause the view to render 64 | // black. 65 | if (QualitySettings.antiAliasing != 0 && QualitySettings.antiAliasing != 1) 66 | { 67 | Debug.Log("MoonlightLoader: Disabling antiAliasing"); 68 | QualitySettings.antiAliasing = 1; 69 | } 70 | } 71 | 72 | if (QualitySettings.vSyncCount != 0) 73 | { 74 | Debug.Log("MoonlightLoader: Setting vsyncCount to 0"); 75 | // We sync in the TimeWarp, so we don't want unity syncing elsewhere. 76 | QualitySettings.vSyncCount = 0; 77 | } 78 | } 79 | 80 | private static void EnforceBundleId() 81 | { 82 | if (!PlayerSettings.virtualRealitySupported) 83 | return; 84 | 85 | if (PlayerSettings.bundleIdentifier == "" || PlayerSettings.bundleIdentifier == "com.Company.ProductName") 86 | { 87 | string defaultBundleId = "com.oculus.UnitySample"; 88 | Debug.LogWarning("\"" + PlayerSettings.bundleIdentifier + "\" is not a valid bundle identifier. Defaulting to \"" + defaultBundleId + "\"."); 89 | PlayerSettings.bundleIdentifier = defaultBundleId; 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRScreenFade.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using System.Collections; // required for Coroutines 24 | 25 | /// 26 | /// Fades the screen from black after a new scene is loaded. 27 | /// 28 | public class OVRScreenFade : MonoBehaviour 29 | { 30 | /// 31 | /// How long it takes to fade. 32 | /// 33 | public float fadeTime = 2.0f; 34 | 35 | /// 36 | /// The initial screen color. 37 | /// 38 | public Color fadeColor = new Color(0.01f, 0.01f, 0.01f, 1.0f); 39 | 40 | private Material fadeMaterial = null; 41 | private bool isFading = false; 42 | private YieldInstruction fadeInstruction = new WaitForEndOfFrame(); 43 | 44 | /// 45 | /// Initialize. 46 | /// 47 | void Awake() 48 | { 49 | // create the fade material 50 | fadeMaterial = new Material(Shader.Find("Oculus/Unlit Transparent Color")); 51 | } 52 | 53 | /// 54 | /// Starts the fade in 55 | /// 56 | void OnEnable() 57 | { 58 | StartCoroutine(FadeIn()); 59 | } 60 | 61 | /// 62 | /// Starts a fade in when a new level is loaded 63 | /// 64 | void OnLevelWasLoaded(int level) 65 | { 66 | StartCoroutine(FadeIn()); 67 | } 68 | 69 | /// 70 | /// Cleans up the fade material 71 | /// 72 | void OnDestroy() 73 | { 74 | if (fadeMaterial != null) 75 | { 76 | Destroy(fadeMaterial); 77 | } 78 | } 79 | 80 | /// 81 | /// Fades alpha from 1.0 to 0.0 82 | /// 83 | IEnumerator FadeIn() 84 | { 85 | float elapsedTime = 0.0f; 86 | fadeMaterial.color = fadeColor; 87 | Color color = fadeColor; 88 | isFading = true; 89 | while (elapsedTime < fadeTime) 90 | { 91 | yield return fadeInstruction; 92 | elapsedTime += Time.deltaTime; 93 | color.a = 1.0f - Mathf.Clamp01(elapsedTime / fadeTime); 94 | fadeMaterial.color = color; 95 | } 96 | isFading = false; 97 | } 98 | 99 | /// 100 | /// Renders the fade overlay when attached to a camera object 101 | /// 102 | void OnPostRender() 103 | { 104 | if (isFading) 105 | { 106 | fadeMaterial.SetPass(0); 107 | GL.PushMatrix(); 108 | GL.LoadOrtho(); 109 | GL.Color(fadeMaterial.color); 110 | GL.Begin(GL.QUADS); 111 | GL.Vertex3(0f, 0f, -12f); 112 | GL.Vertex3(0f, 1f, -12f); 113 | GL.Vertex3(1f, 1f, -12f); 114 | GL.Vertex3(1f, 0f, -12f); 115 | GL.End(); 116 | GL.PopMatrix(); 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /Assets/OVRNaturalMovement/Materials/Line.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Line 10 | m_Shader: {fileID: 4800000, guid: f3afe2e3fa178504c8131053bc886648, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: 2000 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: .5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: .0199999996 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: .5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | m_Colors: 131 | data: 132 | first: 133 | name: _EmissionColor 134 | second: {r: 0, g: 0, b: 0, a: 1} 135 | data: 136 | first: 137 | name: _Color 138 | second: {r: 1, g: 1, b: 1, a: 1} 139 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRTracker.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using System; 23 | using System.Runtime.InteropServices; 24 | using UnityEngine; 25 | using VR = UnityEngine.VR; 26 | 27 | /// 28 | /// An infrared camera that tracks the position of a head-mounted display. 29 | /// 30 | public class OVRTracker 31 | { 32 | /// 33 | /// The (symmetric) visible area in front of the tracker. 34 | /// 35 | public struct Frustum 36 | { 37 | /// 38 | /// The tracker cannot track the HMD unless it is at least this far away. 39 | /// 40 | public float nearZ; 41 | /// 42 | /// The tracker cannot track the HMD unless it is at least this close. 43 | /// 44 | public float farZ; 45 | /// 46 | /// The tracker's horizontal and vertical fields of view in degrees. 47 | /// 48 | public Vector2 fov; 49 | } 50 | 51 | /// 52 | /// If true, a tracker is attached to the system. 53 | /// 54 | public bool isPresent 55 | { 56 | get { 57 | if (!OVRManager.isHmdPresent) 58 | return false; 59 | 60 | return OVRPlugin.positionSupported; 61 | } 62 | } 63 | 64 | /// 65 | /// If true, the tracker can see and track the HMD. Otherwise the HMD may be occluded or the system may be malfunctioning. 66 | /// 67 | public bool isPositionTracked 68 | { 69 | get { 70 | return OVRPlugin.positionTracked; 71 | } 72 | } 73 | 74 | /// 75 | /// If this is true and a tracker is available, the system will use position tracking when isPositionTracked is also true. 76 | /// 77 | public bool isEnabled 78 | { 79 | get { 80 | if (!OVRManager.isHmdPresent) 81 | return false; 82 | 83 | return OVRPlugin.position; 84 | } 85 | 86 | set { 87 | if (!OVRManager.isHmdPresent) 88 | return; 89 | 90 | OVRPlugin.position = value; 91 | } 92 | } 93 | 94 | /// 95 | /// Gets the tracker's viewing frustum. 96 | /// 97 | public Frustum frustum 98 | { 99 | get { 100 | if (!OVRManager.isHmdPresent) 101 | return new Frustum(); 102 | 103 | return OVRPlugin.GetTrackerFrustum(OVRPlugin.Tracker.Default).ToFrustum(); 104 | } 105 | } 106 | 107 | /// 108 | /// Gets the tracker's pose, relative to the head's pose at the time of the last pose recentering. 109 | /// 110 | public OVRPose GetPose(double predictionTime) 111 | { 112 | if (!OVRManager.isHmdPresent) 113 | return OVRPose.identity; 114 | 115 | var p = OVRPlugin.GetTrackerPose(OVRPlugin.Tracker.Default).ToOVRPose(); 116 | 117 | return new OVRPose() 118 | { 119 | position = p.position, 120 | orientation = p.orientation * Quaternion.Euler(0, 180, 0) 121 | }; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/OVROverlay.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using System; 24 | using System.Collections; 25 | using System.Runtime.InteropServices; 26 | using VR = UnityEngine.VR; 27 | 28 | /// 29 | /// Add OVROverlay script to an object with a Quad mesh filter to have the quad 30 | /// rendered as a TimeWarp overlay instead by drawing it into the eye buffer. 31 | /// This will take full advantage of the display resolution and avoid double 32 | /// resampling of the texture. 33 | /// 34 | /// If the texture is dynamically generated, as for an interactive GUI or 35 | /// animation, it must be explicitly triple buffered to avoid flickering 36 | /// when it is referenced asynchronously by TimeWarp. 37 | /// 38 | public class OVROverlay : MonoBehaviour 39 | { 40 | public enum OverlayType 41 | { 42 | None, // Disabled the overlay 43 | Underlay, // Eye buffers blend on top 44 | Overlay, // Blends on top of the eye buffer 45 | OverlayShowLod // Blends on top and colorizes texture level of detail 46 | }; 47 | 48 | OverlayType currentOverlayType = OverlayType.Overlay; 49 | Texture texture; 50 | IntPtr texId = IntPtr.Zero; 51 | 52 | private void ApplyTexture() 53 | { 54 | if (this.GetComponent().material.mainTexture == texture) 55 | return; 56 | 57 | // Getting the NativeTextureID/PTR synchronizes with the multithreaded renderer, which 58 | // causes a problem on the first frame if this gets called after the OVRDisplay initialization, 59 | // so do it in Awake() instead of Start(). 60 | texId = this.GetComponent().material.mainTexture.GetNativeTexturePtr(); 61 | texture = this.GetComponent().material.mainTexture; 62 | } 63 | 64 | void Awake() 65 | { 66 | Debug.Log ("Overlay Awake"); 67 | 68 | ApplyTexture(); 69 | } 70 | 71 | void Start() 72 | { 73 | if (!OVRManager.isHmdPresent) 74 | { 75 | enabled = false; 76 | return; 77 | } 78 | } 79 | 80 | void Update() 81 | { 82 | #if !UNITY_ANDROID || UNITY_EDITOR 83 | ApplyTexture(); 84 | #endif 85 | 86 | if (Input.GetKey (KeyCode.Joystick1Button0)) 87 | { 88 | currentOverlayType = OverlayType.None; 89 | } 90 | else if (Input.GetKey (KeyCode.Joystick1Button1)) 91 | { 92 | currentOverlayType = OverlayType.OverlayShowLod; 93 | } 94 | else 95 | { 96 | currentOverlayType = OverlayType.Overlay; 97 | } 98 | } 99 | 100 | void OnRenderObject() 101 | { 102 | // The overlay must be specified every eye frame, because it is positioned relative to the 103 | // current head location. If frames are dropped, it will be time warped appropriately, 104 | // just like the eye buffers. 105 | 106 | if (currentOverlayType == OverlayType.None) 107 | { 108 | GetComponent().enabled = true; // use normal renderer 109 | return; 110 | } 111 | 112 | bool overlay = (currentOverlayType == OverlayType.Overlay); 113 | 114 | bool headLocked = false; 115 | for (var t = transform; t != null && !headLocked; t = t.parent) 116 | headLocked |= (t == Camera.current.transform); 117 | 118 | 119 | OVRPose pose = (headLocked) ? transform.ToHeadSpacePose() : transform.ToTrackingSpacePose(); 120 | 121 | Vector3 scale = transform.lossyScale; 122 | for (int i = 0; i < 3; ++i) 123 | scale[i] /= Camera.current.transform.lossyScale[i]; 124 | 125 | // render with the overlay plane instead of the normal renderer 126 | GetComponent().enabled = !OVRPlugin.SetOverlayQuad(overlay, headLocked, texId, IntPtr.Zero, pose.flipZ().ToPosef(), scale.ToVector3f()); 127 | } 128 | 129 | } 130 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 1 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowCascade2Split: .333333343 18 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} 19 | blendWeights: 1 20 | textureQuality: 1 21 | anisotropicTextures: 0 22 | antiAliasing: 0 23 | softParticles: 0 24 | softVegetation: 0 25 | realtimeReflectionProbes: 0 26 | billboardsFaceCameraPosition: 0 27 | vSyncCount: 0 28 | lodBias: .300000012 29 | maximumLODLevel: 0 30 | particleRaycastBudget: 4 31 | excludedTargetPlatforms: [] 32 | - serializedVersion: 2 33 | name: Fast 34 | pixelLightCount: 0 35 | shadows: 0 36 | shadowResolution: 0 37 | shadowProjection: 1 38 | shadowCascades: 1 39 | shadowDistance: 20 40 | shadowCascade2Split: .333333343 41 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} 42 | blendWeights: 2 43 | textureQuality: 0 44 | anisotropicTextures: 0 45 | antiAliasing: 2 46 | softParticles: 0 47 | softVegetation: 0 48 | realtimeReflectionProbes: 0 49 | billboardsFaceCameraPosition: 0 50 | vSyncCount: 0 51 | lodBias: .400000006 52 | maximumLODLevel: 0 53 | particleRaycastBudget: 16 54 | excludedTargetPlatforms: [] 55 | - serializedVersion: 2 56 | name: Simple 57 | pixelLightCount: 1 58 | shadows: 1 59 | shadowResolution: 0 60 | shadowProjection: 1 61 | shadowCascades: 1 62 | shadowDistance: 20 63 | shadowCascade2Split: .333333343 64 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} 65 | blendWeights: 2 66 | textureQuality: 0 67 | anisotropicTextures: 1 68 | antiAliasing: 0 69 | softParticles: 0 70 | softVegetation: 0 71 | realtimeReflectionProbes: 0 72 | billboardsFaceCameraPosition: 0 73 | vSyncCount: 0 74 | lodBias: .699999988 75 | maximumLODLevel: 0 76 | particleRaycastBudget: 64 77 | excludedTargetPlatforms: [] 78 | - serializedVersion: 2 79 | name: Good 80 | pixelLightCount: 2 81 | shadows: 2 82 | shadowResolution: 1 83 | shadowProjection: 1 84 | shadowCascades: 2 85 | shadowDistance: 40 86 | shadowCascade2Split: .333333343 87 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} 88 | blendWeights: 2 89 | textureQuality: 0 90 | anisotropicTextures: 1 91 | antiAliasing: 0 92 | softParticles: 0 93 | softVegetation: 1 94 | realtimeReflectionProbes: 1 95 | billboardsFaceCameraPosition: 1 96 | vSyncCount: 1 97 | lodBias: 1 98 | maximumLODLevel: 0 99 | particleRaycastBudget: 256 100 | excludedTargetPlatforms: [] 101 | - serializedVersion: 2 102 | name: Beautiful 103 | pixelLightCount: 3 104 | shadows: 2 105 | shadowResolution: 2 106 | shadowProjection: 1 107 | shadowCascades: 2 108 | shadowDistance: 70 109 | shadowCascade2Split: .333333343 110 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} 111 | blendWeights: 4 112 | textureQuality: 0 113 | anisotropicTextures: 2 114 | antiAliasing: 0 115 | softParticles: 1 116 | softVegetation: 1 117 | realtimeReflectionProbes: 1 118 | billboardsFaceCameraPosition: 1 119 | vSyncCount: 1 120 | lodBias: 1.5 121 | maximumLODLevel: 0 122 | particleRaycastBudget: 1024 123 | excludedTargetPlatforms: [] 124 | - serializedVersion: 2 125 | name: Fantastic 126 | pixelLightCount: 4 127 | shadows: 2 128 | shadowResolution: 2 129 | shadowProjection: 1 130 | shadowCascades: 4 131 | shadowDistance: 150 132 | shadowCascade2Split: .333333343 133 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} 134 | blendWeights: 4 135 | textureQuality: 0 136 | anisotropicTextures: 2 137 | antiAliasing: 0 138 | softParticles: 1 139 | softVegetation: 1 140 | realtimeReflectionProbes: 1 141 | billboardsFaceCameraPosition: 1 142 | vSyncCount: 1 143 | lodBias: 2 144 | maximumLODLevel: 0 145 | particleRaycastBudget: 4096 146 | excludedTargetPlatforms: [] 147 | m_PerPlatformDefaultQuality: 148 | Android: 2 149 | BlackBerry: 2 150 | FlashPlayer: 3 151 | GLES Emulation: 3 152 | PS3: 3 153 | PS4: 3 154 | PSM: 3 155 | PSP2: 3 156 | Samsung TV: 2 157 | Standalone: 3 158 | Tizen: 2 159 | WP8: 3 160 | Web: 3 161 | WebGL: 0 162 | Windows Store Apps: 3 163 | XBOX360: 3 164 | XboxOne: 3 165 | iPhone: 2 166 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/OVRDebugHeadController.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using VR = UnityEngine.VR; 24 | using System.Collections; 25 | 26 | /// 27 | /// This is a simple behavior that can be attached to a parent of the CameraRig in order 28 | /// to provide movement via the gamepad. This is useful when testing an application in 29 | /// the Unity editor without the Head-Mounted Tracker. 30 | /// To use it, create a game object in your scene and drag your CameraRig to be a child 31 | /// of the game object. Then, add the OVRDebugHeadController behavior to the game object. 32 | /// You must also have an OVRGamepadController somewhere in your scene. 33 | /// Alternatively, this behavior can be placed directly on the OVRCameraRig object, but 34 | /// that is not guaranteed to work if OVRCameraRig functionality changes in the future. 35 | /// In the parent case, the object with OVRDebugHeadController can be thougt of as a 36 | /// platform that your camera is attached to. When the platform moves or rotates, the 37 | /// camera moves or rotates, but the camera can still move independently while "on" the 38 | /// platform. 39 | /// In general, this behavior should be disabled when not debugging. 40 | /// 41 | public class OVRDebugHeadController : MonoBehaviour 42 | { 43 | [SerializeField] 44 | public bool AllowPitchLook = false; 45 | [SerializeField] 46 | public bool AllowYawLook = true; 47 | [SerializeField] 48 | public bool InvertPitch = false; 49 | [SerializeField] 50 | public float GamePad_PitchDegreesPerSec = 90.0f; 51 | [SerializeField] 52 | public float GamePad_YawDegreesPerSec = 90.0f; 53 | [SerializeField] 54 | public bool AllowMovement = false; 55 | [SerializeField] 56 | public float ForwardSpeed = 2.0f; 57 | [SerializeField] 58 | public float StrafeSpeed = 2.0f; 59 | 60 | protected OVRCameraRig CameraRig = null; 61 | 62 | void Awake() 63 | { 64 | // locate the camera rig so we can use it to get the current camera transform each frame 65 | OVRCameraRig[] CameraRigs = gameObject.GetComponentsInChildren(); 66 | 67 | if( CameraRigs.Length == 0 ) 68 | Debug.LogWarning("OVRCamParent: No OVRCameraRig attached."); 69 | else if (CameraRigs.Length > 1) 70 | Debug.LogWarning("OVRCamParent: More then 1 OVRCameraRig attached."); 71 | else 72 | CameraRig = CameraRigs[0]; 73 | } 74 | 75 | // Use this for initialization 76 | void Start () 77 | { 78 | 79 | } 80 | 81 | // Update is called once per frame 82 | void Update () 83 | { 84 | if ( AllowMovement ) 85 | { 86 | float gamePad_FwdAxis = OVRGamepadController.GPC_GetAxis( OVRGamepadController.Axis.LeftYAxis ); 87 | float gamePad_StrafeAxis = OVRGamepadController.GPC_GetAxis( OVRGamepadController.Axis.LeftXAxis ); 88 | 89 | Vector3 fwdMove = ( CameraRig.centerEyeAnchor.rotation * Vector3.forward ) * gamePad_FwdAxis * Time.deltaTime * ForwardSpeed; 90 | Vector3 strafeMove = ( CameraRig.centerEyeAnchor.rotation * Vector3.right ) * gamePad_StrafeAxis * Time.deltaTime * StrafeSpeed; 91 | transform.position += fwdMove + strafeMove; 92 | } 93 | 94 | if ( !VR.VRDevice.isPresent && ( AllowYawLook || AllowPitchLook ) ) 95 | { 96 | Quaternion r = transform.rotation; 97 | if ( AllowYawLook ) 98 | { 99 | float gamePadYaw = OVRGamepadController.GPC_GetAxis( OVRGamepadController.Axis.RightXAxis ); 100 | float yawAmount = gamePadYaw * Time.deltaTime * GamePad_YawDegreesPerSec; 101 | Quaternion yawRot = Quaternion.AngleAxis( yawAmount, Vector3.up ); 102 | r = yawRot * r; 103 | } 104 | if ( AllowPitchLook ) 105 | { 106 | float gamePadPitch = OVRGamepadController.GPC_GetAxis( OVRGamepadController.Axis.RightYAxis ); 107 | if ( Mathf.Abs( gamePadPitch ) > 0.0001f ) 108 | { 109 | if ( InvertPitch ) 110 | { 111 | gamePadPitch *= -1.0f; 112 | } 113 | float pitchAmount = gamePadPitch * Time.deltaTime * GamePad_PitchDegreesPerSec; 114 | Quaternion pitchRot = Quaternion.AngleAxis( pitchAmount, Vector3.left ); 115 | r = r * pitchRot; 116 | } 117 | } 118 | 119 | transform.rotation = r; 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRCommon.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using System.Collections.Generic; 24 | 25 | /// 26 | /// Miscellaneous extension methods that any script can use. 27 | /// 28 | public static class OVRExtensions 29 | { 30 | /// 31 | /// Converts the given world-space transform to an OVRPose in tracking space. 32 | /// 33 | public static OVRPose ToTrackingSpacePose(this Transform transform) 34 | { 35 | OVRPose headPose; 36 | headPose.position = UnityEngine.VR.InputTracking.GetLocalPosition(UnityEngine.VR.VRNode.Head); 37 | headPose.orientation = UnityEngine.VR.InputTracking.GetLocalRotation(UnityEngine.VR.VRNode.Head); 38 | 39 | var ret = headPose * transform.ToHeadSpacePose(); 40 | 41 | return ret; 42 | } 43 | 44 | /// 45 | /// Converts the given world-space transform to an OVRPose in head space. 46 | /// 47 | public static OVRPose ToHeadSpacePose(this Transform transform) 48 | { 49 | return Camera.current.transform.ToOVRPose().Inverse() * transform.ToOVRPose(); 50 | } 51 | 52 | internal static OVRPose ToOVRPose(this Transform t, bool isLocal = false) 53 | { 54 | OVRPose pose; 55 | pose.orientation = (isLocal) ? t.localRotation : t.rotation; 56 | pose.position = (isLocal) ? t.localPosition : t.position; 57 | return pose; 58 | } 59 | 60 | internal static void FromOVRPose(this Transform t, OVRPose pose, bool isLocal = false) 61 | { 62 | if (isLocal) 63 | { 64 | t.localRotation = pose.orientation; 65 | t.localPosition = pose.position; 66 | } 67 | else 68 | { 69 | t.rotation = pose.orientation; 70 | t.position = pose.position; 71 | } 72 | } 73 | 74 | internal static OVRPose ToOVRPose(this OVRPlugin.Posef p) 75 | { 76 | return new OVRPose() 77 | { 78 | position = new Vector3(p.Position.x, p.Position.y, -p.Position.z), 79 | orientation = new Quaternion(-p.Orientation.x, -p.Orientation.y, p.Orientation.z, p.Orientation.w) 80 | }; 81 | } 82 | 83 | internal static OVRTracker.Frustum ToFrustum(this OVRPlugin.Frustumf f) 84 | { 85 | return new OVRTracker.Frustum() 86 | { 87 | nearZ = f.zNear, 88 | farZ = f.zFar, 89 | 90 | fov = new Vector2() 91 | { 92 | x = Mathf.Rad2Deg * f.fovX, 93 | y = Mathf.Rad2Deg * f.fovY 94 | } 95 | }; 96 | } 97 | 98 | internal static OVRPlugin.Vector3f ToVector3f(this Vector3 v) 99 | { 100 | return new OVRPlugin.Vector3f() { x = v.x, y = v.y, z = v.z }; 101 | } 102 | 103 | internal static OVRPlugin.Quatf ToQuatf(this Quaternion q) 104 | { 105 | return new OVRPlugin.Quatf() { x = q.x, y = q.y, z = q.z, w = q.w }; 106 | } 107 | } 108 | 109 | /// 110 | /// An affine transformation built from a Unity position and orientation. 111 | /// 112 | public struct OVRPose 113 | { 114 | /// 115 | /// A pose with no translation or rotation. 116 | /// 117 | public static OVRPose identity 118 | { 119 | get { 120 | return new OVRPose() 121 | { 122 | position = Vector3.zero, 123 | orientation = Quaternion.identity 124 | }; 125 | } 126 | } 127 | 128 | /// 129 | /// The position. 130 | /// 131 | public Vector3 position; 132 | 133 | /// 134 | /// The orientation. 135 | /// 136 | public Quaternion orientation; 137 | 138 | /// 139 | /// Multiplies two poses. 140 | /// 141 | public static OVRPose operator*(OVRPose lhs, OVRPose rhs) 142 | { 143 | var ret = new OVRPose(); 144 | ret.position = lhs.position + lhs.orientation * rhs.position; 145 | ret.orientation = lhs.orientation * rhs.orientation; 146 | return ret; 147 | } 148 | 149 | /// 150 | /// Computes the inverse of the given pose. 151 | /// 152 | public OVRPose Inverse() 153 | { 154 | OVRPose ret; 155 | ret.orientation = Quaternion.Inverse(orientation); 156 | ret.position = ret.orientation * -position; 157 | return ret; 158 | } 159 | 160 | /// 161 | /// Converts the pose from left- to right-handed or vice-versa. 162 | /// 163 | internal OVRPose flipZ() 164 | { 165 | var ret = this; 166 | ret.position.z = -ret.position.z; 167 | return ret; 168 | } 169 | 170 | internal OVRPlugin.Posef ToPosef() 171 | { 172 | return new OVRPlugin.Posef() 173 | { 174 | Position = position.ToVector3f(), 175 | Orientation = orientation.ToQuatf() 176 | }; 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /Assets/OVR/Meshes/Cone.obj: -------------------------------------------------------------------------------- 1 | # Alias OBJ Model File 2 | # Exported from SketchUp, (c) 2000-2012 Trimble Navigation Limited 3 | # File units = meters 4 | 5 | mtllib cone.mtl 6 | 7 | g Mesh1 Model 8 | 9 | usemtl FrontColor 10 | v 0.492734 0 0.0849313 11 | vt -19.399 -3.34375 12 | vn 0 -1 -0 13 | v 0.453963 0 0.209566 14 | vt -17.8725 -8.25064 15 | v 0.384254 0 0.31992 16 | vt -15.1281 -12.5953 17 | v 0.28836 0 0.408471 18 | vt -11.3528 -16.0815 19 | v 0.172814 0 0.469186 20 | vt -6.80371 -18.4719 21 | v 0.0454916 0 0.497926 22 | vt -1.79101 -19.6034 23 | v -0.0849313 0 0.492734 24 | vt 3.34375 -19.399 25 | v -0.209566 0 0.453963 26 | vt 8.25064 -17.8725 27 | v -0.31992 0 0.384254 28 | vt 12.5953 -15.1281 29 | v -0.408471 0 0.28836 30 | vt 16.0815 -11.3528 31 | v -0.469186 0 0.172814 32 | vt 18.4719 -6.80371 33 | v -0.497926 0 0.0454916 34 | vt 19.6034 -1.79101 35 | v -0.492734 0 -0.0849313 36 | vt 19.399 3.34375 37 | v -0.453963 0 -0.209566 38 | vt 17.8725 8.25064 39 | v -0.384254 0 -0.31992 40 | vt 15.1281 12.5953 41 | v -0.28836 0 -0.408471 42 | vt 11.3528 16.0815 43 | v -0.172814 0 -0.469186 44 | vt 6.80371 18.4719 45 | v -0.0454916 0 -0.497926 46 | vt 1.79101 19.6034 47 | v 0.0849313 0 -0.492734 48 | vt -3.34375 19.399 49 | v 0.209566 0 -0.453963 50 | vt -8.25064 17.8725 51 | v 0.31992 0 -0.384254 52 | vt -12.5953 15.1281 53 | v 0.408471 0 -0.28836 54 | vt -16.0815 11.3528 55 | v 0.469186 0 -0.172814 56 | vt -18.4719 6.80371 57 | v 0.497926 0 -0.0454916 58 | vt -19.6034 1.79101 59 | f 1/1/1 2/2/1 3/3/1 4/4/1 5/5/1 6/6/1 7/7/1 8/8/1 9/9/1 10/10/1 11/11/1 12/12/1 13/13/1 14/14/1 15/15/1 16/16/1 17/17/1 18/18/1 19/19/1 20/20/1 21/21/1 22/22/1 23/23/1 24/24/1 60 | 61 | vt -2.56941 -8.65407 62 | vn 0.812403 0.446486 0.375036 63 | vt 2.56941 -8.65407 64 | vn 0.881787 0.446486 0.151991 65 | v 0.00100113 1 0.000172563 66 | vt 0.00522052 35.2704 67 | v 0.000922359 1 0.000425796 68 | vt -0.00522052 35.2704 69 | f 2/25/2 1/26/3 25/27/3 26/28/2 70 | 71 | vn 0.891079 0.446486 -0.0814109 72 | v 0.00101168 1 -9.24296e-005 73 | f 1/25/3 24/26/4 27/27/4 25/28/3 74 | 75 | vn 0.839646 0.446486 -0.309265 76 | v 0.000953289 1 -0.000351123 77 | f 27/28/4 24/25/4 23/26/5 28/27/5 78 | 79 | vn 0.730992 0.446486 -0.516044 80 | v 0.000829929 1 -0.000585888 81 | f 28/28/5 23/25/5 22/26/6 29/27/6 82 | 83 | vn 0.572522 0.446486 -0.687654 84 | v 0.000650011 1 -0.000780726 85 | f 29/28/6 22/25/6 21/26/7 30/27/7 86 | 87 | vn 0.375036 0.446486 -0.812403 88 | v 0.000425796 1 -0.000922359 89 | f 30/28/7 21/25/7 20/26/8 31/27/8 90 | 91 | vn 0.151991 0.446486 -0.881787 92 | v 0.000172563 1 -0.00100113 93 | f 31/28/8 20/25/8 19/26/9 32/27/9 94 | 95 | vn -0.0814109 0.446486 -0.891079 96 | v -9.24296e-005 1 -0.00101168 97 | f 32/28/9 19/25/9 18/26/10 33/27/10 98 | 99 | vn -0.309265 0.446486 -0.839646 100 | v -0.000351123 1 -0.000953289 101 | f 33/28/10 18/25/10 17/26/11 34/27/11 102 | 103 | vn -0.516044 0.446486 -0.730992 104 | v -0.000585888 1 -0.000829929 105 | f 34/28/11 17/25/11 16/26/12 35/27/12 106 | 107 | vn -0.687654 0.446486 -0.572522 108 | v -0.000780726 1 -0.000650011 109 | f 35/28/12 16/25/12 15/26/13 36/27/13 110 | 111 | vn -0.812403 0.446486 -0.375036 112 | v -0.000922359 1 -0.000425796 113 | f 36/28/13 15/25/13 14/26/14 37/27/14 114 | 115 | vn -0.881787 0.446486 -0.151991 116 | v -0.00100113 1 -0.000172563 117 | f 37/28/14 14/25/14 13/26/15 38/27/15 118 | 119 | vn -0.891079 0.446486 0.0814109 120 | v -0.00101168 1 9.24296e-005 121 | f 38/28/15 13/25/15 12/26/16 39/27/16 122 | 123 | vn -0.839646 0.446486 0.309265 124 | v -0.000953289 1 0.000351123 125 | f 12/25/16 11/26/17 40/27/17 39/28/16 126 | 127 | vn -0.730992 0.446486 0.516044 128 | v -0.000829929 1 0.000585888 129 | f 11/25/17 10/26/18 41/27/18 40/28/17 130 | 131 | vn -0.572522 0.446486 0.687654 132 | v -0.000650011 1 0.000780726 133 | f 10/25/18 9/26/19 42/27/19 41/28/18 134 | 135 | vn -0.375036 0.446486 0.812403 136 | v -0.000425796 1 0.000922359 137 | f 9/25/19 8/26/20 43/27/20 42/28/19 138 | 139 | vn -0.151991 0.446486 0.881787 140 | v -0.000172563 1 0.00100113 141 | f 8/25/20 7/26/21 44/27/21 43/28/20 142 | 143 | vn 0.0814109 0.446486 0.891079 144 | v 9.24296e-005 1 0.00101168 145 | f 7/25/21 6/26/22 45/27/22 44/28/21 146 | 147 | vn 0.309265 0.446486 0.839646 148 | v 0.000351123 1 0.000953289 149 | f 6/25/22 5/26/23 46/27/23 45/28/22 150 | 151 | vn 0.516044 0.446486 0.730992 152 | v 0.000585888 1 0.000829929 153 | f 5/25/23 4/26/24 47/27/24 46/28/23 154 | 155 | vn 0.687654 0.446486 0.572522 156 | v 0.000780726 1 0.000650011 157 | f 4/25/24 3/26/25 48/27/25 47/28/24 158 | 159 | f 3/25/25 2/26/2 26/27/2 48/28/25 160 | 161 | vt 0.0398301 0.00363896 162 | vn 0 1 -0 163 | vt 0.0375311 0.0138237 164 | vt 0.0326744 0.0230665 165 | vt 0.025591 0.0307372 166 | vt 0.0167636 0.0363133 167 | vt 0.00679382 0.0394147 168 | vt -0.00363896 0.0398301 169 | vt -0.0138237 0.0375311 170 | vt -0.0230665 0.0326744 171 | vt -0.0307372 0.025591 172 | vt -0.0363133 0.0167636 173 | vt -0.0394147 0.00679382 174 | vt -0.0398301 -0.00363896 175 | vt -0.0375311 -0.0138237 176 | vt -0.0326744 -0.0230665 177 | vt -0.025591 -0.0307372 178 | vt -0.0167636 -0.0363133 179 | vt -0.00679382 -0.0394147 180 | vt 0.00363896 -0.0398301 181 | vt 0.0138237 -0.0375311 182 | vt 0.0230665 -0.0326744 183 | vt 0.0307372 -0.025591 184 | vt 0.0363133 -0.0167636 185 | vt 0.0394147 -0.00679382 186 | f 27/29/26 28/30/26 29/31/26 30/32/26 31/33/26 32/34/26 33/35/26 34/36/26 35/37/26 36/38/26 37/39/26 38/40/26 39/41/26 40/42/26 41/43/26 42/44/26 43/45/26 44/46/26 45/47/26 46/48/26 47/49/26 48/50/26 26/51/26 25/52/26 187 | 188 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRProfile.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using System.Collections; 24 | using System.Threading; 25 | using VR = UnityEngine.VR; 26 | 27 | /// 28 | /// Contains information about the user's preferences and body dimensions. 29 | /// 30 | /// 31 | /// ** Accessing the cloud profile data ** 32 | /// 33 | /// > Create a new profile object: 34 | /// 35 | /// OVRProfile profile = new OVRProfile(); 36 | /// 37 | /// 38 | /// > Call Java async load (connects to Horizon service for local data): 39 | /// 40 | /// profile.TriggerAndroidLoad() 41 | /// 42 | /// 43 | /// For most cases, you can probably just create the profile object in Awake() and 44 | /// immediately call the load. 45 | /// 46 | /// 47 | /// > Check the status of the load: 48 | /// 49 | /// profile.GetState(); 50 | /// 51 | /// Possible returns, are an enum OVRProfile.State: 52 | /// 53 | /// NOT_TRIGGERED // Haven't called TriggerAndroidLoad() yet 54 | /// LOADING // Java hasn't returned a result yet 55 | /// READY // Success, we have profile data from Horizon 56 | /// ERROR // Something failed, maybe no Horizon, no user, etc 57 | /// 58 | /// 59 | /// > Check to see if the load failed for some reason, maybe no Horizon installed or no 60 | /// logged in user: 61 | /// 62 | /// profile.IsLoadFailure(); 63 | /// 64 | /// For the failure case in OVRProfile.ProfileCompleteListener.onFailure(), 65 | /// it might make sense to set defaults using OVRProfile.SetFallbackDefaults(), as 66 | /// it's unlikely any retry would succeed where the original request failed. 67 | /// 68 | /// > If everything went well, we can now the the logged in user ID, name and locale using: 69 | /// 70 | /// profile.GetID(); //ex: 9dasfl454 71 | /// profile.GetName(); //ex: brian.dewolff 72 | /// profile.GetLocale(); //ex: en_US 73 | /// 74 | /// 75 | public class OVRProfile : Object 76 | { 77 | public enum State 78 | { 79 | NOT_TRIGGERED, 80 | LOADING, 81 | READY, 82 | ERROR 83 | }; 84 | 85 | #if UNITY_ANDROID && !UNITY_EDITOR 86 | private class ProfileCompleteListener : OVROnCompleteListener 87 | { 88 | private OVRProfile mProfile; 89 | 90 | public ProfileCompleteListener(OVRProfile profile) 91 | { 92 | mProfile = profile; 93 | } 94 | 95 | public override void onSuccess() 96 | { 97 | mProfile.SetFromSystem(); 98 | } 99 | 100 | public override void onFailure() 101 | { 102 | mProfile.state = State.ERROR; 103 | } 104 | } 105 | #endif 106 | 107 | public string id { get; private set; } 108 | public string userName { get; private set; } 109 | public string locale { get; private set; } 110 | public float ipd { get; private set; } 111 | public float eyeHeight { get; private set; } 112 | public float eyeDepth { get; private set; } 113 | public float neckHeight { get; private set; } 114 | 115 | public State state { get; private set; } 116 | 117 | #if UNITY_ANDROID && !UNITY_EDITOR 118 | private AndroidJavaClass jniOvr; 119 | #endif 120 | 121 | public OVRProfile() 122 | { 123 | SetFallbackDefaults(); 124 | } 125 | 126 | public void TriggerLoad() 127 | { 128 | state = State.LOADING; 129 | 130 | #if UNITY_ANDROID && !UNITY_EDITOR 131 | try 132 | { 133 | AndroidJavaClass player = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); 134 | AndroidJavaObject activity = player.GetStatic("currentActivity"); 135 | 136 | jniOvr = new AndroidJavaClass("com.oculus.svclib.OVR"); 137 | jniOvr.CallStatic("loadProfileAsync", activity, new ProfileCompleteListener(this)); 138 | } 139 | catch 140 | { 141 | Debug.LogWarning("Failed to create Profile Listener"); 142 | state = State.ERROR; 143 | } 144 | #else 145 | SetFromSystem(); 146 | #endif 147 | } 148 | 149 | private void SetFromSystem() 150 | { 151 | SetFallbackDefaults(); 152 | 153 | #if UNITY_ANDROID && !UNITY_EDITOR 154 | id = jniOvr.CallStatic("getProfileID"); 155 | userName = jniOvr.CallStatic("getProfileName"); 156 | locale = jniOvr.CallStatic("getProfileLocale"); 157 | #endif 158 | 159 | if (OVRManager.isHmdPresent) 160 | { 161 | ipd = OVRPlugin.ipd; 162 | eyeHeight = OVRPlugin.eyeHeight; 163 | eyeDepth = OVRPlugin.eyeDepth; 164 | neckHeight = eyeHeight - 0.075f; 165 | } 166 | 167 | state = State.READY; 168 | } 169 | 170 | private void SetFallbackDefaults() 171 | { 172 | id = "000abc123def"; 173 | userName = "Oculus User"; 174 | locale = "en_US"; 175 | 176 | ipd = 0.06f; 177 | eyeHeight = 1.675f; 178 | eyeDepth = 0.0805f; 179 | neckHeight = eyeHeight - 0.075f; 180 | 181 | state = State.NOT_TRIGGERED; 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/OVRDisplay.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using System; 23 | using System.Runtime.InteropServices; 24 | using System.Text.RegularExpressions; 25 | using UnityEngine; 26 | using VR = UnityEngine.VR; 27 | 28 | /// 29 | /// Manages an Oculus Rift head-mounted display (HMD). 30 | /// 31 | public class OVRDisplay 32 | { 33 | /// 34 | /// Specifies the size and field-of-view for one eye texture. 35 | /// 36 | public struct EyeRenderDesc 37 | { 38 | /// 39 | /// The horizontal and vertical size of the texture. 40 | /// 41 | public Vector2 resolution; 42 | 43 | /// 44 | /// The angle of the horizontal and vertical field of view in degrees. 45 | /// 46 | public Vector2 fov; 47 | } 48 | 49 | /// 50 | /// Contains latency measurements for a single frame of rendering. 51 | /// 52 | public struct LatencyData 53 | { 54 | /// 55 | /// The time it took to render both eyes in seconds. 56 | /// 57 | public float render; 58 | 59 | /// 60 | /// The time it took to perform TimeWarp in seconds. 61 | /// 62 | public float timeWarp; 63 | 64 | /// 65 | /// The time between the end of TimeWarp and scan-out in seconds. 66 | /// 67 | public float postPresent; 68 | public float renderError; 69 | public float timeWarpError; 70 | } 71 | 72 | private bool needsConfigureTexture; 73 | private EyeRenderDesc[] eyeDescs = new EyeRenderDesc[2]; 74 | 75 | /// 76 | /// Creates an instance of OVRDisplay. Called by OVRManager. 77 | /// 78 | public OVRDisplay() 79 | { 80 | UpdateTextures(); 81 | } 82 | 83 | /// 84 | /// Updates the internal state of the OVRDisplay. Called by OVRManager. 85 | /// 86 | public void Update() 87 | { 88 | UpdateTextures(); 89 | } 90 | 91 | /// 92 | /// Occurs when the head pose is reset. 93 | /// 94 | public event System.Action RecenteredPose; 95 | 96 | /// 97 | /// Recenters the head pose. 98 | /// 99 | public void RecenterPose() 100 | { 101 | VR.InputTracking.Recenter(); 102 | 103 | if (RecenteredPose != null) 104 | { 105 | RecenteredPose(); 106 | } 107 | } 108 | 109 | /// 110 | /// Gets the current acceleration of the head. 111 | /// 112 | public Vector3 acceleration 113 | { 114 | get { 115 | if (!OVRManager.isHmdPresent) 116 | return Vector3.zero; 117 | 118 | OVRPose ret = OVRPlugin.GetEyeAcceleration(OVRPlugin.Eye.None).ToOVRPose(); 119 | return -ret.position; 120 | } 121 | } 122 | 123 | /// 124 | /// Gets the current angular velocity of the head. 125 | /// 126 | public Vector3 angularVelocity 127 | { 128 | get { 129 | if (!OVRManager.isHmdPresent) 130 | return Vector3.zero; 131 | 132 | OVRPose ret = OVRPlugin.GetEyeVelocity(OVRPlugin.Eye.None).ToOVRPose(); 133 | return ret.orientation.eulerAngles; 134 | } 135 | } 136 | 137 | /// 138 | /// Gets the resolution and field of view for the given eye. 139 | /// 140 | public EyeRenderDesc GetEyeRenderDesc(VR.VRNode eye) 141 | { 142 | return eyeDescs[(int)eye]; 143 | } 144 | 145 | /// 146 | /// Gets the current measured latency values. 147 | /// 148 | public LatencyData latency 149 | { 150 | get { 151 | if (!OVRManager.isHmdPresent) 152 | return new LatencyData(); 153 | 154 | string latency = OVRPlugin.latency; 155 | 156 | var r = new Regex("Render: ([0-9]+[.][0-9]+)ms, TimeWarp: ([0-9]+[.][0-9]+)ms, PostPresent: ([0-9]+[.][0-9]+)ms", RegexOptions.None); 157 | 158 | var ret = new LatencyData(); 159 | 160 | Match match = r.Match(latency); 161 | if (match.Success) 162 | { 163 | ret.render = float.Parse(match.Groups[1].Value); 164 | ret.timeWarp = float.Parse(match.Groups[2].Value); 165 | ret.postPresent = float.Parse(match.Groups[3].Value); 166 | } 167 | 168 | return ret; 169 | } 170 | } 171 | 172 | private void UpdateTextures() 173 | { 174 | ConfigureEyeDesc(VR.VRNode.LeftEye); 175 | ConfigureEyeDesc(VR.VRNode.RightEye); 176 | } 177 | 178 | private void ConfigureEyeDesc(VR.VRNode eye) 179 | { 180 | if (!OVRManager.isHmdPresent) 181 | return; 182 | 183 | OVRPlugin.Sizei size = OVRPlugin.GetEyeTextureSize((OVRPlugin.Eye)eye); 184 | OVRPlugin.Frustumf frust = OVRPlugin.GetEyeFrustum((OVRPlugin.Eye)eye); 185 | 186 | eyeDescs[(int)eye] = new EyeRenderDesc() 187 | { 188 | resolution = new Vector2(size.w, size.h), 189 | fov = Mathf.Rad2Deg * new Vector2(frust.fovX, frust.fovY), 190 | }; 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRGridCube.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using System.Collections; 24 | 25 | /// 26 | /// Diagnostic display with a regular grid of cubes for visual testing of 27 | /// tracking and distortion. 28 | /// 29 | public class OVRGridCube : MonoBehaviour 30 | { 31 | /// 32 | /// The key that toggles the grid of cubes. 33 | /// 34 | public KeyCode GridKey = KeyCode.G; 35 | 36 | private GameObject CubeGrid = null; 37 | 38 | private bool CubeGridOn = false; 39 | private bool CubeSwitchColorOld = false; 40 | private bool CubeSwitchColor = false; 41 | 42 | private int gridSizeX = 6; 43 | private int gridSizeY = 4; 44 | private int gridSizeZ = 6; 45 | private float gridScale = 0.3f; 46 | private float cubeScale = 0.03f; 47 | 48 | // Handle to OVRCameraRig 49 | private OVRCameraRig CameraController = null; 50 | 51 | /// 52 | /// Update this instance. 53 | /// 54 | void Update () 55 | { 56 | UpdateCubeGrid(); 57 | } 58 | 59 | /// 60 | /// Sets the OVR camera controller. 61 | /// 62 | /// Camera controller. 63 | public void SetOVRCameraController(ref OVRCameraRig cameraController) 64 | { 65 | CameraController = cameraController; 66 | } 67 | 68 | void UpdateCubeGrid() 69 | { 70 | // Toggle the grid cube display on 'G' 71 | if(Input.GetKeyDown(GridKey)) 72 | { 73 | if(CubeGridOn == false) 74 | { 75 | CubeGridOn = true; 76 | Debug.LogWarning("CubeGrid ON"); 77 | if(CubeGrid != null) 78 | CubeGrid.SetActive(true); 79 | else 80 | CreateCubeGrid(); 81 | } 82 | else 83 | { 84 | CubeGridOn = false; 85 | Debug.LogWarning("CubeGrid OFF"); 86 | 87 | if(CubeGrid != null) 88 | CubeGrid.SetActive(false); 89 | } 90 | } 91 | 92 | if(CubeGrid != null) 93 | { 94 | // Set cube colors to let user know if camera is tracking 95 | CubeSwitchColor = !OVRManager.tracker.isPositionTracked; 96 | 97 | if(CubeSwitchColor != CubeSwitchColorOld) 98 | CubeGridSwitchColor(CubeSwitchColor); 99 | CubeSwitchColorOld = CubeSwitchColor; 100 | } 101 | } 102 | 103 | void CreateCubeGrid() 104 | { 105 | Debug.LogWarning("Create CubeGrid"); 106 | 107 | // Create the visual cube grid 108 | CubeGrid = new GameObject("CubeGrid"); 109 | // Set a layer to target a specific camera 110 | CubeGrid.layer = CameraController.gameObject.layer; 111 | 112 | for (int x = -gridSizeX; x <= gridSizeX; x++) 113 | for (int y = -gridSizeY; y <= gridSizeY; y++) 114 | for (int z = -gridSizeZ; z <= gridSizeZ; z++) 115 | { 116 | // Set the cube type: 117 | // 0 = non-axis cube 118 | // 1 = axis cube 119 | // 2 = center cube 120 | int CubeType = 0; 121 | if ((x == 0 && y == 0) || (x == 0 && z == 0) || (y == 0 && z == 0)) 122 | { 123 | if((x == 0) && (y == 0) && (z == 0)) 124 | CubeType = 2; 125 | else 126 | CubeType = 1; 127 | } 128 | 129 | GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); 130 | 131 | BoxCollider bc = cube.GetComponent(); 132 | bc.enabled = false; 133 | 134 | cube.layer = CameraController.gameObject.layer; 135 | 136 | // No shadows 137 | Renderer r = cube.GetComponent(); 138 | 139 | #if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5 || UNITY_4_6 140 | // Renderer.castShadows was deprecated starting in Unity 5.0 141 | r.castShadows = false; 142 | #else 143 | r.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; 144 | #endif 145 | 146 | r.receiveShadows = false; 147 | 148 | // Cube line is white down the middle 149 | if (CubeType == 0) 150 | r.material.color = Color.red; 151 | else if (CubeType == 1) 152 | r.material.color = Color.white; 153 | else 154 | r.material.color = Color.yellow; 155 | 156 | cube.transform.position = 157 | new Vector3(((float)x * gridScale), 158 | ((float)y * gridScale), 159 | ((float)z * gridScale)); 160 | 161 | float s = 0.7f; 162 | 163 | // Axis cubes are bigger 164 | if(CubeType == 1) 165 | s = 1.0f; 166 | // Center cube is the largest 167 | if(CubeType == 2) 168 | s = 2.0f; 169 | 170 | cube.transform.localScale = 171 | new Vector3(cubeScale * s, cubeScale * s, cubeScale * s); 172 | 173 | cube.transform.parent = CubeGrid.transform; 174 | } 175 | } 176 | 177 | /// 178 | /// Switch the Cube grid color. 179 | /// 180 | /// If set to true cube switch color. 181 | void CubeGridSwitchColor(bool CubeSwitchColor) 182 | { 183 | Color c = Color.red; 184 | if(CubeSwitchColor == true) 185 | c = Color.blue; 186 | 187 | foreach(Transform child in CubeGrid.transform) 188 | { 189 | Material m = child.GetComponent().material; 190 | // Cube line is white down the middle 191 | if(m.color == Color.red || m.color == Color.blue) 192 | m.color = c; 193 | } 194 | } 195 | } 196 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRSceneSampleController.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using System.Collections; 24 | using VR = UnityEngine.VR; 25 | 26 | /// 27 | /// Sample that allows you to play with various VR settings. 28 | /// 29 | public class OVRSceneSampleController : MonoBehaviour 30 | { 31 | /// 32 | /// The key that quits the application. 33 | /// 34 | public KeyCode quitKey = KeyCode.Escape; 35 | 36 | /// 37 | /// An optional texture that appears before the menu fades in. 38 | /// 39 | public Texture fadeInTexture = null; 40 | 41 | /// 42 | /// Controls how quickly the player's speed and rotation change based on input. 43 | /// 44 | public float speedRotationIncrement = 0.05f; 45 | 46 | private OVRPlayerController playerController = null; 47 | 48 | // Handle to OVRCameraRig 49 | private OVRCameraRig cameraController = null; 50 | 51 | /// 52 | /// We can set the layer to be anything we want to, this allows 53 | /// a specific camera to render it. 54 | /// 55 | public string layerName = "Default"; 56 | 57 | // Vision mode on/off 58 | private bool visionMode = true; 59 | 60 | // We want to hold onto GridCube, for potential sharing 61 | // of the menu RenderTarget 62 | OVRGridCube gridCube = null; 63 | 64 | #if SHOW_DK2_VARIABLES 65 | private string strVisionMode = "Vision Enabled: ON"; 66 | #endif 67 | 68 | #region MonoBehaviour Message Handlers 69 | /// 70 | /// Awake this instance. 71 | /// 72 | void Awake() 73 | { 74 | // Find camera controller 75 | OVRCameraRig[] cameraControllers; 76 | cameraControllers = gameObject.GetComponentsInChildren(); 77 | 78 | if (cameraControllers.Length == 0) 79 | { 80 | Debug.LogWarning("OVRMainMenu: No OVRCameraRig attached."); 81 | } 82 | else if (cameraControllers.Length > 1) 83 | { 84 | Debug.LogWarning("OVRMainMenu: More then 1 OVRCameraRig attached."); 85 | } 86 | else 87 | { 88 | cameraController = cameraControllers[0]; 89 | } 90 | 91 | // Find player controller 92 | OVRPlayerController[] playerControllers; 93 | playerControllers = gameObject.GetComponentsInChildren(); 94 | 95 | if (playerControllers.Length == 0) 96 | { 97 | Debug.LogWarning("OVRMainMenu: No OVRPlayerController attached."); 98 | } 99 | else if (playerControllers.Length > 1) 100 | { 101 | Debug.LogWarning("OVRMainMenu: More then 1 OVRPlayerController attached."); 102 | } 103 | else 104 | { 105 | playerController = playerControllers[0]; 106 | } 107 | } 108 | 109 | /// 110 | /// Start this instance. 111 | /// 112 | void Start() 113 | { 114 | // Make sure to hide cursor 115 | if (Application.isEditor == false) 116 | { 117 | #if UNITY_5 118 | Cursor.visible = false; 119 | Cursor.lockState = CursorLockMode.Locked; 120 | #else 121 | Screen.showCursor = false; 122 | Screen.lockCursor = true; 123 | #endif 124 | } 125 | 126 | // CameraController updates 127 | if (cameraController != null) 128 | { 129 | // Add a GridCube component to this object 130 | gridCube = gameObject.AddComponent(); 131 | gridCube.SetOVRCameraController(ref cameraController); 132 | } 133 | } 134 | 135 | 136 | /// 137 | /// Update this instance. 138 | /// 139 | void Update() 140 | { 141 | // Recenter pose 142 | UpdateRecenterPose(); 143 | 144 | // Turn On/Off Vision Mode 145 | UpdateVisionMode(); 146 | 147 | // Update Speed and Rotation Scale 148 | if (playerController != null) 149 | UpdateSpeedAndRotationScaleMultiplier(); 150 | 151 | // Toggle Fullscreen 152 | if (Input.GetKeyDown(KeyCode.F11)) 153 | Screen.fullScreen = !Screen.fullScreen; 154 | 155 | if (Input.GetKeyDown(KeyCode.M)) 156 | VR.VRSettings.showDeviceView = !VR.VRSettings.showDeviceView; 157 | 158 | #if !UNITY_ANDROID || UNITY_EDITOR 159 | // Escape Application 160 | if (Input.GetKeyDown(quitKey)) 161 | Application.Quit(); 162 | #endif 163 | } 164 | #endregion 165 | 166 | /// 167 | /// Updates the vision mode. 168 | /// 169 | void UpdateVisionMode() 170 | { 171 | if (Input.GetKeyDown(KeyCode.F2)) 172 | { 173 | visionMode ^= visionMode; 174 | OVRManager.tracker.isEnabled = visionMode; 175 | } 176 | } 177 | 178 | /// 179 | /// Updates the speed and rotation scale multiplier. 180 | /// 181 | void UpdateSpeedAndRotationScaleMultiplier() 182 | { 183 | float moveScaleMultiplier = 0.0f; 184 | playerController.GetMoveScaleMultiplier(ref moveScaleMultiplier); 185 | 186 | if (Input.GetKeyDown(KeyCode.Alpha7)) 187 | { 188 | moveScaleMultiplier -= speedRotationIncrement; 189 | } 190 | else if (Input.GetKeyDown(KeyCode.Alpha8)) 191 | { 192 | moveScaleMultiplier += speedRotationIncrement; 193 | } 194 | 195 | playerController.SetMoveScaleMultiplier(moveScaleMultiplier); 196 | 197 | float rotationScaleMultiplier = 0.0f; 198 | playerController.GetRotationScaleMultiplier(ref rotationScaleMultiplier); 199 | 200 | if (Input.GetKeyDown(KeyCode.Alpha9)) 201 | { 202 | rotationScaleMultiplier -= speedRotationIncrement; 203 | } 204 | else if (Input.GetKeyDown(KeyCode.Alpha0)) 205 | { 206 | rotationScaleMultiplier += speedRotationIncrement; 207 | } 208 | 209 | playerController.SetRotationScaleMultiplier(rotationScaleMultiplier); 210 | } 211 | 212 | /// 213 | /// Recenter pose 214 | /// 215 | void UpdateRecenterPose() 216 | { 217 | if (Input.GetKeyDown(KeyCode.R)) 218 | OVRManager.display.RecenterPose(); 219 | } 220 | } 221 | -------------------------------------------------------------------------------- /Assets/OVR/Moonlight/Scripts/OVRTouchpad.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using System; 24 | 25 | /// 26 | /// Interface class to a touchpad. 27 | /// 28 | public static class OVRTouchpad 29 | { 30 | /// 31 | /// Touch Type. 32 | /// 33 | public enum TouchEvent 34 | { 35 | SingleTap, 36 | Left, 37 | Right, 38 | Up, 39 | Down, 40 | }; 41 | 42 | /// 43 | /// Details about a touch event. 44 | /// 45 | public class TouchArgs : EventArgs 46 | { 47 | public TouchEvent TouchType; 48 | } 49 | 50 | /// 51 | /// Occurs when touched. 52 | /// 53 | public static event EventHandler TouchHandler; 54 | 55 | /// 56 | /// Native Touch State. 57 | /// 58 | enum TouchState 59 | { 60 | Init, 61 | Down, 62 | Stationary, 63 | Move, 64 | Up 65 | }; 66 | 67 | static TouchState touchState = TouchState.Init; 68 | static Vector2 moveAmount; 69 | static float minMovMagnitude = 100.0f; // Tune this to gage between click and swipe 70 | 71 | // mouse 72 | static Vector3 moveAmountMouse; 73 | static float minMovMagnitudeMouse = 25.0f; 74 | 75 | // Disable the unused variable warning 76 | #pragma warning disable 0414 77 | // Ensures that the TouchpadHelper will be created automatically upon start of the scene. 78 | static private OVRTouchpadHelper touchpadHelper = 79 | (new GameObject("OVRTouchpadHelper")).AddComponent(); 80 | #pragma warning restore 0414 81 | 82 | /// 83 | /// Add the Touchpad game object into the scene. 84 | /// 85 | static public void Create() 86 | { 87 | // Does nothing but call constructor to add game object into scene 88 | } 89 | 90 | static public void Update() 91 | { 92 | /* 93 | // TOUCHPAD INPUT 94 | if (Input.touchCount > 0) 95 | { 96 | switch(Input.GetTouch(0).phase) 97 | { 98 | case(TouchPhase.Began): 99 | touchState = TouchState.Down; 100 | // Get absolute location of touch 101 | moveAmount = Input.GetTouch(0).position; 102 | break; 103 | 104 | case(TouchPhase.Moved): 105 | touchState = TouchState.Move; 106 | break; 107 | 108 | case(TouchPhase.Stationary): 109 | touchState = TouchState.Stationary; 110 | break; 111 | 112 | case(TouchPhase.Ended): 113 | moveAmount -= Input.GetTouch(0).position; 114 | HandleInput(touchState, ref moveAmount); 115 | touchState = TouchState.Init; 116 | break; 117 | 118 | case(TouchPhase.Canceled): 119 | Debug.Log( "CANCELLED\n" ); 120 | touchState = TouchState.Init; 121 | break; 122 | } 123 | } 124 | */ 125 | // MOUSE INPUT 126 | if (Input.GetMouseButtonDown(0)) 127 | { 128 | moveAmountMouse = Input.mousePosition; 129 | touchState = TouchState.Down; 130 | } 131 | else if (Input.GetMouseButtonUp(0)) 132 | { 133 | moveAmountMouse -= Input.mousePosition; 134 | HandleInputMouse(ref moveAmountMouse); 135 | touchState = TouchState.Init; 136 | } 137 | } 138 | 139 | static public void OnDisable() 140 | { 141 | } 142 | 143 | /// 144 | /// Determines if input was a click or swipe and sends message to all prescribers. 145 | /// 146 | static void HandleInput(TouchState state, ref Vector2 move) 147 | { 148 | if ((move.magnitude < minMovMagnitude) || (touchState == TouchState.Stationary)) 149 | { 150 | //Debug.Log( "CLICK" ); 151 | } 152 | else if (touchState == TouchState.Move) 153 | { 154 | move.Normalize(); 155 | 156 | // Left 157 | if(Mathf.Abs(move.x) > Mathf.Abs (move.y)) 158 | { 159 | if(move.x > 0.0f) 160 | { 161 | //Debug.Log( "SWIPE: LEFT" ); 162 | } 163 | else 164 | { 165 | //Debug.Log( "SWIPE: RIGHT" ); 166 | } 167 | } 168 | // Right 169 | else 170 | { 171 | if(move.y > 0.0f) 172 | { 173 | //Debug.Log( "SWIPE: DOWN" ); 174 | } 175 | else 176 | { 177 | //Debug.Log( "SWIPE: UP" ); 178 | } 179 | } 180 | } 181 | } 182 | 183 | static void HandleInputMouse(ref Vector3 move) 184 | { 185 | if (move.magnitude < minMovMagnitudeMouse) 186 | { 187 | if (TouchHandler != null) 188 | { 189 | TouchHandler(null, new TouchArgs() { TouchType = TouchEvent.SingleTap }); 190 | } 191 | } 192 | else 193 | { 194 | move.Normalize(); 195 | 196 | // Left/Right 197 | if (Mathf.Abs(move.x) > Mathf.Abs(move.y)) 198 | { 199 | if (move.x > 0.0f) 200 | { 201 | if (TouchHandler != null) 202 | { 203 | TouchHandler(null, new TouchArgs () { TouchType = TouchEvent.Left }); 204 | } 205 | } 206 | else 207 | { 208 | if (TouchHandler != null) 209 | { 210 | TouchHandler(null, new TouchArgs () { TouchType = TouchEvent.Right }); 211 | } 212 | } 213 | } 214 | // Up/Down 215 | else 216 | { 217 | if (move.y > 0.0f) 218 | { 219 | if (TouchHandler != null) 220 | { 221 | TouchHandler(null, new TouchArgs () { TouchType = TouchEvent.Down }); 222 | } 223 | } 224 | else 225 | { 226 | if(TouchHandler != null) 227 | { 228 | TouchHandler(null, new TouchArgs () { TouchType = TouchEvent.Up }); 229 | } 230 | } 231 | } 232 | } 233 | } 234 | } 235 | 236 | /// 237 | /// This singleton class gets created and stays resident in the application. It is used to 238 | /// trap the touchpad values, which get broadcast to any listener on the "Touchpad" channel. 239 | /// 240 | public sealed class OVRTouchpadHelper : MonoBehaviour 241 | { 242 | void Awake() 243 | { 244 | DontDestroyOnLoad(gameObject); 245 | } 246 | 247 | void Start() 248 | { 249 | // Add a listener to the OVRMessenger for testing 250 | OVRTouchpad.TouchHandler += LocalTouchEventCallback; 251 | } 252 | 253 | void Update() 254 | { 255 | OVRTouchpad.Update(); 256 | } 257 | 258 | public void OnDisable() 259 | { 260 | OVRTouchpad.OnDisable(); 261 | } 262 | 263 | void LocalTouchEventCallback(object sender, EventArgs args) 264 | { 265 | var touchArgs = (OVRTouchpad.TouchArgs)args; 266 | OVRTouchpad.TouchEvent touchEvent = touchArgs.TouchType; 267 | 268 | switch(touchEvent) 269 | { 270 | case OVRTouchpad.TouchEvent.SingleTap: 271 | //Debug.Log("SINGLE CLICK\n"); 272 | break; 273 | 274 | case OVRTouchpad.TouchEvent.Left: 275 | //Debug.Log("LEFT SWIPE\n"); 276 | break; 277 | 278 | case OVRTouchpad.TouchEvent.Right: 279 | //Debug.Log("RIGHT SWIPE\n"); 280 | break; 281 | 282 | case OVRTouchpad.TouchEvent.Up: 283 | //Debug.Log("UP SWIPE\n"); 284 | break; 285 | 286 | case OVRTouchpad.TouchEvent.Down: 287 | //Debug.Log("DOWN SWIPE\n"); 288 | break; 289 | } 290 | } 291 | } 292 | -------------------------------------------------------------------------------- /Assets/OVR/Scripts/Util/OVRTrackerBounds.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. 4 | 5 | Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 6 | you may not use the Oculus VR Rift SDK except in compliance with the License, 7 | which is provided at the time of installation or download, or which 8 | otherwise accompanies this software in either electronic or hard copy form. 9 | 10 | You may obtain a copy of the License at 11 | 12 | http://www.oculusvr.com/licenses/LICENSE-3.2 13 | 14 | Unless required by applicable law or agreed to in writing, the Oculus VR SDK 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | ************************************************************************************/ 21 | 22 | using UnityEngine; 23 | using System.Collections; 24 | using UnityEngine.UI; 25 | using VR = UnityEngine.VR; 26 | 27 | /// 28 | /// Calculates distance to tracking volume and displays arrows or icons when close. 29 | /// 30 | [ExecuteInEditMode] 31 | public class OVRTrackerBounds : MonoBehaviour 32 | { 33 | private static readonly int numPlanes = 6; 34 | private Plane[] plane = new Plane[numPlanes]; 35 | 36 | public bool enableFade = true; 37 | [Tooltip("Distance from volume to start fading")] 38 | public float fadeDistance = 0.1f; 39 | [Tooltip("Maximum fade amount (from 0.0 to 1.0)")] 40 | public float fadeMaximum = 0.2f; 41 | public Color fadeColor = Color.black; 42 | 43 | public bool enableIcons = false; 44 | public Texture2D [] iconTextures; 45 | public RawImage iconImage; 46 | 47 | public bool enableArrow = true; 48 | public GameObject arrowObject; 49 | public Vector3 arrowOffset = Vector3.zero; 50 | public float arrowDistance = 0.2f; 51 | public float animSpeed = 10.0f; 52 | public float animDistance = 0.2f; 53 | public float waitTime = 10f; 54 | 55 | private Material fadeMaterial = null; 56 | private Color iconColor = new Color(1,1,1,1); 57 | 58 | public void SetEnableFade(bool b) 59 | { 60 | enableFade = b; 61 | } 62 | 63 | public void SetEnableArrow(bool b) 64 | { 65 | enableArrow = b; 66 | } 67 | 68 | void Awake() 69 | { 70 | if (!Application.isPlaying) 71 | return; 72 | 73 | fadeMaterial = new Material(Shader.Find("Oculus/Unlit Transparent Color")); 74 | } 75 | 76 | void OnDestroy() 77 | { 78 | if (fadeMaterial != null) 79 | Destroy(fadeMaterial); 80 | } 81 | 82 | /// 83 | /// Computes frustum planes from tracker frustum parameters. 84 | /// 85 | void ComputePlanes() 86 | { 87 | OVRTracker.Frustum frustum = OVRManager.tracker.frustum; 88 | float nearZ = frustum.nearZ; 89 | float farZ = frustum.farZ; 90 | float hFOV = Mathf.Deg2Rad * frustum.fov.x * 0.5f; 91 | float vFOV = Mathf.Deg2Rad * frustum.fov.y * 0.5f; 92 | float sx = Mathf.Sin(hFOV); 93 | float sy = Mathf.Sin(vFOV); 94 | 95 | plane[0] = new Plane(Vector3.zero, farZ * new Vector3(sx, sy, 1f), farZ * new Vector3(sx, -sy, 1f)); // right 96 | plane[1] = new Plane(Vector3.zero, farZ * new Vector3(-sx, -sy, 1f), farZ * new Vector3(-sx, sy, 1f)); // left 97 | plane[2] = new Plane(Vector3.zero, farZ * new Vector3(-sx, sy, 1f), farZ * new Vector3(sx, sy, 1f)); // top 98 | plane[3] = new Plane(Vector3.zero, farZ * new Vector3(sx, -sy, 1f), farZ * new Vector3(-sx, -sy, 1f)); // bottom 99 | plane[4] = new Plane(farZ * new Vector3(sx, sy, 1f), farZ * new Vector3(-sx, sy, 1f), farZ * new Vector3(-sx, -sy, 1f)); // far 100 | plane[5] = new Plane(nearZ * new Vector3(-sx, -sy, 1f), nearZ * new Vector3(-sx, sy, 1f), nearZ * new Vector3(sx, sy, 1f) ); // near 101 | } 102 | 103 | /// 104 | /// Computes signed distance to frustum planes as maximum of distance to each plane 105 | /// negative inside volume, positive outside. 106 | /// 107 | float DistanceToPlanes(Vector3 p, out int closestPlane) 108 | { 109 | float maxd = Mathf.NegativeInfinity; 110 | closestPlane = 0; 111 | for (int i = 0; i < numPlanes; i++) 112 | { 113 | float d = plane[i].GetDistanceToPoint(p); 114 | if (d > maxd) 115 | { 116 | closestPlane = i; 117 | maxd = d; 118 | } 119 | } 120 | return maxd; 121 | } 122 | 123 | /// 124 | /// Interpolates between a and b with custom smoothing. 125 | /// 126 | static float SmoothStep(float a, float b, float x) 127 | { 128 | float t = Mathf.Clamp01((x - a) / (b - a)); 129 | return t * t * (3.0f - 2.0f * t); 130 | } 131 | 132 | void Update () 133 | { 134 | if (!Application.isPlaying || !OVRManager.tracker.isPresent || Time.time < waitTime) 135 | { 136 | if (arrowObject && arrowObject.activeSelf) 137 | arrowObject.SetActive(false); 138 | 139 | if (iconImage != null) 140 | { 141 | iconImage.enabled = false; 142 | iconImage.gameObject.SetActive(false); 143 | } 144 | 145 | return; 146 | } 147 | 148 | // TODO - probably don't have to do this every frame! 149 | ComputePlanes(); 150 | 151 | OVRPose trackerPose = OVRManager.tracker.GetPose(0f); 152 | Matrix4x4 trackerMat = Matrix4x4.TRS(trackerPose.position, trackerPose.orientation, Vector3.one); 153 | 154 | // Transform point into volume space 155 | OVRPose headPose; 156 | headPose.position = VR.InputTracking.GetLocalPosition(VR.VRNode.Head); 157 | 158 | Vector3 localPos = trackerMat.inverse.MultiplyPoint(headPose.position); 159 | 160 | int closestPlane; 161 | float dist = DistanceToPlanes(localPos, out closestPlane); 162 | //Debug.Log("dist = " + dist); 163 | 164 | if (enableIcons) 165 | { 166 | // Display arrow icon if approaching edge of volume 167 | if (dist > -fadeDistance) 168 | { 169 | iconImage.gameObject.SetActive(true); 170 | iconImage.enabled = true; 171 | iconImage.texture = iconTextures[closestPlane]; 172 | iconColor.a = SmoothStep(-fadeDistance, 0.0f, dist); 173 | iconImage.color = iconColor; 174 | } 175 | else 176 | { 177 | iconImage.enabled = false; 178 | iconImage.gameObject.SetActive(false); 179 | } 180 | } 181 | 182 | if (arrowObject) 183 | { 184 | // Display animated arrow object pointing back towards volume 185 | if (enableArrow && dist > -arrowDistance) 186 | { 187 | arrowObject.SetActive(true); 188 | 189 | Vector3 planeNormal = plane[closestPlane].normal; 190 | Vector3 planeNormalTS = trackerMat.MultiplyVector(planeNormal); 191 | 192 | arrowObject.transform.localPosition = arrowOffset + planeNormalTS * Mathf.Sin(Time.time * animSpeed) * animDistance; 193 | arrowObject.transform.rotation = Quaternion.FromToRotation(Vector3.forward, -planeNormalTS); 194 | } 195 | else 196 | { 197 | arrowObject.SetActive(false); 198 | } 199 | } 200 | 201 | // Fade based on distance from planes 202 | fadeMaximum = Mathf.Clamp01(fadeMaximum); 203 | fadeColor.a = SmoothStep(-fadeDistance, 0.0f, dist) * fadeMaximum; 204 | } 205 | 206 | void OnRenderObject() 207 | { 208 | if (!Application.isPlaying || !OVRManager.tracker.isPresent || Time.time < waitTime) 209 | return; 210 | 211 | // Full-screen fade 212 | if (enableFade && fadeColor.a > 0.0) 213 | { 214 | fadeMaterial.color = fadeColor; 215 | fadeMaterial.SetPass(0); 216 | GL.PushMatrix(); 217 | GL.LoadOrtho(); 218 | GL.Begin(GL.QUADS); 219 | GL.Vertex3(0f, 0f, 0f); 220 | GL.Vertex3(0f, 1f, 0f); 221 | GL.Vertex3(1f, 1f, 0f); 222 | GL.Vertex3(1f, 0f, 0f); 223 | GL.End(); 224 | GL.PopMatrix(); 225 | } 226 | } 227 | 228 | } 229 | -------------------------------------------------------------------------------- /Assets/OVR/Prefabs/OVRCameraRig.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100000 4 | GameObject: 5 | m_ObjectHideFlags: 1 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 400000} 11 | m_Layer: 0 12 | m_Name: RightEyeAnchor 13 | m_TagString: Untagged 14 | m_Icon: {fileID: 0} 15 | m_NavMeshLayer: 0 16 | m_StaticEditorFlags: 0 17 | m_IsActive: 1 18 | --- !u!1 &100002 19 | GameObject: 20 | m_ObjectHideFlags: 1 21 | m_PrefabParentObject: {fileID: 0} 22 | m_PrefabInternal: {fileID: 100100000} 23 | serializedVersion: 4 24 | m_Component: 25 | - 4: {fileID: 400002} 26 | - 81: {fileID: 8100000} 27 | - 20: {fileID: 2037080} 28 | m_Layer: 0 29 | m_Name: CenterEyeAnchor 30 | m_TagString: MainCamera 31 | m_Icon: {fileID: 0} 32 | m_NavMeshLayer: 0 33 | m_StaticEditorFlags: 0 34 | m_IsActive: 1 35 | --- !u!1 &100004 36 | GameObject: 37 | m_ObjectHideFlags: 0 38 | m_PrefabParentObject: {fileID: 0} 39 | m_PrefabInternal: {fileID: 100100000} 40 | serializedVersion: 4 41 | m_Component: 42 | - 4: {fileID: 400004} 43 | - 114: {fileID: 11400010} 44 | - 114: {fileID: 11400000} 45 | m_Layer: 0 46 | m_Name: OVRCameraRig 47 | m_TagString: Untagged 48 | m_Icon: {fileID: 0} 49 | m_NavMeshLayer: 0 50 | m_StaticEditorFlags: 0 51 | m_IsActive: 1 52 | --- !u!1 &100006 53 | GameObject: 54 | m_ObjectHideFlags: 1 55 | m_PrefabParentObject: {fileID: 0} 56 | m_PrefabInternal: {fileID: 100100000} 57 | serializedVersion: 4 58 | m_Component: 59 | - 4: {fileID: 400006} 60 | m_Layer: 0 61 | m_Name: LeftEyeAnchor 62 | m_TagString: Untagged 63 | m_Icon: {fileID: 0} 64 | m_NavMeshLayer: 0 65 | m_StaticEditorFlags: 0 66 | m_IsActive: 1 67 | --- !u!1 &109308 68 | GameObject: 69 | m_ObjectHideFlags: 1 70 | m_PrefabParentObject: {fileID: 0} 71 | m_PrefabInternal: {fileID: 100100000} 72 | serializedVersion: 4 73 | m_Component: 74 | - 4: {fileID: 482130} 75 | m_Layer: 0 76 | m_Name: LeftHandAnchor 77 | m_TagString: Untagged 78 | m_Icon: {fileID: 0} 79 | m_NavMeshLayer: 0 80 | m_StaticEditorFlags: 0 81 | m_IsActive: 1 82 | --- !u!1 &113768 83 | GameObject: 84 | m_ObjectHideFlags: 1 85 | m_PrefabParentObject: {fileID: 0} 86 | m_PrefabInternal: {fileID: 100100000} 87 | serializedVersion: 4 88 | m_Component: 89 | - 4: {fileID: 487254} 90 | m_Layer: 0 91 | m_Name: RightHandAnchor 92 | m_TagString: Untagged 93 | m_Icon: {fileID: 0} 94 | m_NavMeshLayer: 0 95 | m_StaticEditorFlags: 0 96 | m_IsActive: 1 97 | --- !u!1 &159718 98 | GameObject: 99 | m_ObjectHideFlags: 0 100 | m_PrefabParentObject: {fileID: 0} 101 | m_PrefabInternal: {fileID: 100100000} 102 | serializedVersion: 4 103 | m_Component: 104 | - 4: {fileID: 459718} 105 | m_Layer: 0 106 | m_Name: TrackingSpace 107 | m_TagString: Untagged 108 | m_Icon: {fileID: 0} 109 | m_NavMeshLayer: 0 110 | m_StaticEditorFlags: 0 111 | m_IsActive: 1 112 | --- !u!1 &168682 113 | GameObject: 114 | m_ObjectHideFlags: 1 115 | m_PrefabParentObject: {fileID: 0} 116 | m_PrefabInternal: {fileID: 100100000} 117 | serializedVersion: 4 118 | m_Component: 119 | - 4: {fileID: 468682} 120 | m_Layer: 0 121 | m_Name: TrackerAnchor 122 | m_TagString: Untagged 123 | m_Icon: {fileID: 0} 124 | m_NavMeshLayer: 0 125 | m_StaticEditorFlags: 0 126 | m_IsActive: 1 127 | --- !u!4 &400000 128 | Transform: 129 | m_ObjectHideFlags: 1 130 | m_PrefabParentObject: {fileID: 0} 131 | m_PrefabInternal: {fileID: 100100000} 132 | m_GameObject: {fileID: 100000} 133 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 134 | m_LocalPosition: {x: 0, y: 0, z: 0} 135 | m_LocalScale: {x: 1, y: 1, z: 1} 136 | m_Children: [] 137 | m_Father: {fileID: 459718} 138 | m_RootOrder: 2 139 | --- !u!4 &400002 140 | Transform: 141 | m_ObjectHideFlags: 1 142 | m_PrefabParentObject: {fileID: 0} 143 | m_PrefabInternal: {fileID: 100100000} 144 | m_GameObject: {fileID: 100002} 145 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 146 | m_LocalPosition: {x: 0, y: 0, z: 0} 147 | m_LocalScale: {x: 1, y: 1, z: 1} 148 | m_Children: [] 149 | m_Father: {fileID: 459718} 150 | m_RootOrder: 1 151 | --- !u!4 &400004 152 | Transform: 153 | m_ObjectHideFlags: 1 154 | m_PrefabParentObject: {fileID: 0} 155 | m_PrefabInternal: {fileID: 100100000} 156 | m_GameObject: {fileID: 100004} 157 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 158 | m_LocalPosition: {x: 0, y: 0, z: 0} 159 | m_LocalScale: {x: 1, y: 1, z: 1} 160 | m_Children: 161 | - {fileID: 459718} 162 | m_Father: {fileID: 0} 163 | m_RootOrder: 0 164 | --- !u!4 &400006 165 | Transform: 166 | m_ObjectHideFlags: 1 167 | m_PrefabParentObject: {fileID: 0} 168 | m_PrefabInternal: {fileID: 100100000} 169 | m_GameObject: {fileID: 100006} 170 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 171 | m_LocalPosition: {x: 0, y: 0, z: 0} 172 | m_LocalScale: {x: 1, y: 1, z: 1} 173 | m_Children: [] 174 | m_Father: {fileID: 459718} 175 | m_RootOrder: 0 176 | --- !u!4 &459718 177 | Transform: 178 | m_ObjectHideFlags: 1 179 | m_PrefabParentObject: {fileID: 0} 180 | m_PrefabInternal: {fileID: 100100000} 181 | m_GameObject: {fileID: 159718} 182 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 183 | m_LocalPosition: {x: 0, y: 0, z: 0} 184 | m_LocalScale: {x: 1, y: 1, z: 1} 185 | m_Children: 186 | - {fileID: 400006} 187 | - {fileID: 400002} 188 | - {fileID: 400000} 189 | - {fileID: 468682} 190 | - {fileID: 482130} 191 | - {fileID: 487254} 192 | m_Father: {fileID: 400004} 193 | m_RootOrder: 0 194 | --- !u!4 &468682 195 | Transform: 196 | m_ObjectHideFlags: 1 197 | m_PrefabParentObject: {fileID: 0} 198 | m_PrefabInternal: {fileID: 100100000} 199 | m_GameObject: {fileID: 168682} 200 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 201 | m_LocalPosition: {x: 0, y: 0, z: 0} 202 | m_LocalScale: {x: 1, y: 1, z: 1} 203 | m_Children: [] 204 | m_Father: {fileID: 459718} 205 | m_RootOrder: 3 206 | --- !u!4 &482130 207 | Transform: 208 | m_ObjectHideFlags: 1 209 | m_PrefabParentObject: {fileID: 0} 210 | m_PrefabInternal: {fileID: 100100000} 211 | m_GameObject: {fileID: 109308} 212 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 213 | m_LocalPosition: {x: 0, y: 0, z: 0} 214 | m_LocalScale: {x: 1, y: 1, z: 1} 215 | m_Children: [] 216 | m_Father: {fileID: 459718} 217 | m_RootOrder: 4 218 | --- !u!4 &487254 219 | Transform: 220 | m_ObjectHideFlags: 1 221 | m_PrefabParentObject: {fileID: 0} 222 | m_PrefabInternal: {fileID: 100100000} 223 | m_GameObject: {fileID: 113768} 224 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 225 | m_LocalPosition: {x: 0, y: 0, z: 0} 226 | m_LocalScale: {x: 1, y: 1, z: 1} 227 | m_Children: [] 228 | m_Father: {fileID: 459718} 229 | m_RootOrder: 5 230 | --- !u!20 &2037080 231 | Camera: 232 | m_ObjectHideFlags: 1 233 | m_PrefabParentObject: {fileID: 0} 234 | m_PrefabInternal: {fileID: 100100000} 235 | m_GameObject: {fileID: 100002} 236 | m_Enabled: 1 237 | serializedVersion: 2 238 | m_ClearFlags: 1 239 | m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} 240 | m_NormalizedViewPortRect: 241 | serializedVersion: 2 242 | x: 0 243 | y: 0 244 | width: 1 245 | height: 1 246 | near clip plane: .100000001 247 | far clip plane: 1000 248 | field of view: 90 249 | orthographic: 0 250 | orthographic size: 5 251 | m_Depth: 0 252 | m_CullingMask: 253 | serializedVersion: 2 254 | m_Bits: 4294967295 255 | m_RenderingPath: -1 256 | m_TargetTexture: {fileID: 0} 257 | m_TargetDisplay: 0 258 | m_HDR: 0 259 | m_OcclusionCulling: 1 260 | m_StereoConvergence: 10 261 | m_StereoSeparation: .0219999999 262 | m_StereoMirrorMode: 0 263 | --- !u!81 &8100000 264 | AudioListener: 265 | m_ObjectHideFlags: 1 266 | m_PrefabParentObject: {fileID: 0} 267 | m_PrefabInternal: {fileID: 100100000} 268 | m_GameObject: {fileID: 100002} 269 | m_Enabled: 1 270 | --- !u!114 &11400000 271 | MonoBehaviour: 272 | m_ObjectHideFlags: 1 273 | m_PrefabParentObject: {fileID: 0} 274 | m_PrefabInternal: {fileID: 100100000} 275 | m_GameObject: {fileID: 100004} 276 | m_Enabled: 1 277 | m_EditorHideFlags: 0 278 | m_Script: {fileID: 11500000, guid: 7e933e81d3c20c74ea6fdc708a67e3a5, type: 3} 279 | m_Name: 280 | m_EditorClassIdentifier: 281 | queueAhead: 1 282 | usePositionTracking: 1 283 | resetTrackerOnLoad: 1 284 | --- !u!114 &11400010 285 | MonoBehaviour: 286 | m_ObjectHideFlags: 1 287 | m_PrefabParentObject: {fileID: 0} 288 | m_PrefabInternal: {fileID: 100100000} 289 | m_GameObject: {fileID: 100004} 290 | m_Enabled: 1 291 | m_EditorHideFlags: 0 292 | m_Script: {fileID: 11500000, guid: df9f338034892c44ebb62d97894772f1, type: 3} 293 | m_Name: 294 | m_EditorClassIdentifier: 295 | --- !u!1001 &100100000 296 | Prefab: 297 | m_ObjectHideFlags: 1 298 | serializedVersion: 2 299 | m_Modification: 300 | m_TransformParent: {fileID: 0} 301 | m_Modifications: [] 302 | m_RemovedComponents: [] 303 | m_ParentPrefab: {fileID: 0} 304 | m_RootGameObject: {fileID: 100004} 305 | m_IsPrefabParent: 1 306 | -------------------------------------------------------------------------------- /Assets/OVR/Scenes/Trivial.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | SceneSettings: 5 | m_ObjectHideFlags: 0 6 | m_PVSData: 7 | m_PVSObjectsArray: [] 8 | m_PVSPortalsArray: [] 9 | m_OcclusionBakeSettings: 10 | smallestOccluder: 5 11 | smallestHole: .25 12 | backfaceThreshold: 100 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 6 17 | m_Fog: 0 18 | m_FogColor: {r: .5, g: .5, b: .5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: .00999999978 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1} 24 | m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1} 25 | m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 29 | m_HaloStrength: .5 30 | m_FlareStrength: 1 31 | m_FlareFadeSpeed: 3 32 | m_HaloTexture: {fileID: 0} 33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 34 | m_DefaultReflectionMode: 0 35 | m_DefaultReflectionResolution: 128 36 | m_ReflectionBounces: 1 37 | m_ReflectionIntensity: 1 38 | m_CustomReflection: {fileID: 0} 39 | m_Sun: {fileID: 0} 40 | --- !u!127 &3 41 | LevelGameManager: 42 | m_ObjectHideFlags: 0 43 | --- !u!157 &4 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 5 47 | m_GIWorkflowMode: 0 48 | m_LightmapsMode: 1 49 | m_GISettings: 50 | serializedVersion: 2 51 | m_BounceScale: 1 52 | m_IndirectOutputScale: 1 53 | m_AlbedoBoost: 1 54 | m_TemporalCoherenceThreshold: 1 55 | m_EnvironmentLightingMode: 0 56 | m_EnableBakedLightmaps: 1 57 | m_EnableRealtimeLightmaps: 1 58 | m_LightmapEditorSettings: 59 | serializedVersion: 3 60 | m_Resolution: 2 61 | m_BakeResolution: 40 62 | m_TextureWidth: 1024 63 | m_TextureHeight: 1024 64 | m_AOMaxDistance: 1 65 | m_Padding: 2 66 | m_CompAOExponent: 0 67 | m_LightmapParameters: {fileID: 0} 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherRayCount: 1024 71 | m_LightmapSnapshot: {fileID: 0} 72 | m_RuntimeCPUUsage: 25 73 | --- !u!196 &5 74 | NavMeshSettings: 75 | serializedVersion: 2 76 | m_ObjectHideFlags: 0 77 | m_BuildSettings: 78 | serializedVersion: 2 79 | agentRadius: .5 80 | agentHeight: 2 81 | agentSlope: 45 82 | agentClimb: .400000006 83 | ledgeDropHeight: 0 84 | maxJumpAcrossDistance: 0 85 | accuratePlacement: 0 86 | minRegionArea: 2 87 | cellSize: .166666672 88 | manualCellSize: 0 89 | m_NavMeshData: {fileID: 0} 90 | --- !u!1 &97357214 91 | GameObject: 92 | m_ObjectHideFlags: 0 93 | m_PrefabParentObject: {fileID: 0} 94 | m_PrefabInternal: {fileID: 0} 95 | serializedVersion: 4 96 | m_Component: 97 | - 4: {fileID: 97357218} 98 | - 33: {fileID: 97357217} 99 | - 65: {fileID: 97357216} 100 | - 23: {fileID: 97357215} 101 | m_Layer: 0 102 | m_Name: Cube 103 | m_TagString: Untagged 104 | m_Icon: {fileID: 0} 105 | m_NavMeshLayer: 0 106 | m_StaticEditorFlags: 0 107 | m_IsActive: 1 108 | --- !u!23 &97357215 109 | MeshRenderer: 110 | m_ObjectHideFlags: 0 111 | m_PrefabParentObject: {fileID: 0} 112 | m_PrefabInternal: {fileID: 0} 113 | m_GameObject: {fileID: 97357214} 114 | m_Enabled: 1 115 | m_CastShadows: 1 116 | m_ReceiveShadows: 1 117 | m_Materials: 118 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 119 | m_SubsetIndices: 120 | m_StaticBatchRoot: {fileID: 0} 121 | m_UseLightProbes: 1 122 | m_ReflectionProbeUsage: 1 123 | m_ProbeAnchor: {fileID: 0} 124 | m_ScaleInLightmap: 1 125 | m_PreserveUVs: 1 126 | m_ImportantGI: 0 127 | m_AutoUVMaxDistance: .5 128 | m_AutoUVMaxAngle: 89 129 | m_LightmapParameters: {fileID: 0} 130 | m_SortingLayerID: 0 131 | m_SortingOrder: 0 132 | --- !u!65 &97357216 133 | BoxCollider: 134 | m_ObjectHideFlags: 0 135 | m_PrefabParentObject: {fileID: 0} 136 | m_PrefabInternal: {fileID: 0} 137 | m_GameObject: {fileID: 97357214} 138 | m_Material: {fileID: 0} 139 | m_IsTrigger: 0 140 | m_Enabled: 1 141 | serializedVersion: 2 142 | m_Size: {x: 1, y: 1, z: 1} 143 | m_Center: {x: 0, y: 0, z: 0} 144 | --- !u!33 &97357217 145 | MeshFilter: 146 | m_ObjectHideFlags: 0 147 | m_PrefabParentObject: {fileID: 0} 148 | m_PrefabInternal: {fileID: 0} 149 | m_GameObject: {fileID: 97357214} 150 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 151 | --- !u!4 &97357218 152 | Transform: 153 | m_ObjectHideFlags: 0 154 | m_PrefabParentObject: {fileID: 0} 155 | m_PrefabInternal: {fileID: 0} 156 | m_GameObject: {fileID: 97357214} 157 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 158 | m_LocalPosition: {x: 0, y: 0, z: -8} 159 | m_LocalScale: {x: 1, y: 1, z: 1} 160 | m_Children: [] 161 | m_Father: {fileID: 0} 162 | m_RootOrder: 2 163 | --- !u!1 &1437328436 164 | GameObject: 165 | m_ObjectHideFlags: 0 166 | m_PrefabParentObject: {fileID: 0} 167 | m_PrefabInternal: {fileID: 0} 168 | serializedVersion: 4 169 | m_Component: 170 | - 4: {fileID: 1437328441} 171 | - 20: {fileID: 1437328440} 172 | - 92: {fileID: 1437328439} 173 | - 124: {fileID: 1437328438} 174 | - 81: {fileID: 1437328437} 175 | m_Layer: 0 176 | m_Name: Main Camera 177 | m_TagString: MainCamera 178 | m_Icon: {fileID: 0} 179 | m_NavMeshLayer: 0 180 | m_StaticEditorFlags: 0 181 | m_IsActive: 1 182 | --- !u!81 &1437328437 183 | AudioListener: 184 | m_ObjectHideFlags: 0 185 | m_PrefabParentObject: {fileID: 0} 186 | m_PrefabInternal: {fileID: 0} 187 | m_GameObject: {fileID: 1437328436} 188 | m_Enabled: 1 189 | --- !u!124 &1437328438 190 | Behaviour: 191 | m_ObjectHideFlags: 0 192 | m_PrefabParentObject: {fileID: 0} 193 | m_PrefabInternal: {fileID: 0} 194 | m_GameObject: {fileID: 1437328436} 195 | m_Enabled: 1 196 | --- !u!92 &1437328439 197 | Behaviour: 198 | m_ObjectHideFlags: 0 199 | m_PrefabParentObject: {fileID: 0} 200 | m_PrefabInternal: {fileID: 0} 201 | m_GameObject: {fileID: 1437328436} 202 | m_Enabled: 1 203 | --- !u!20 &1437328440 204 | Camera: 205 | m_ObjectHideFlags: 0 206 | m_PrefabParentObject: {fileID: 0} 207 | m_PrefabInternal: {fileID: 0} 208 | m_GameObject: {fileID: 1437328436} 209 | m_Enabled: 1 210 | serializedVersion: 2 211 | m_ClearFlags: 1 212 | m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} 213 | m_NormalizedViewPortRect: 214 | serializedVersion: 2 215 | x: 0 216 | y: 0 217 | width: 1 218 | height: 1 219 | near clip plane: .300000012 220 | far clip plane: 1000 221 | field of view: 60 222 | orthographic: 0 223 | orthographic size: 5 224 | m_Depth: -1 225 | m_CullingMask: 226 | serializedVersion: 2 227 | m_Bits: 4294967295 228 | m_RenderingPath: -1 229 | m_TargetTexture: {fileID: 0} 230 | m_TargetDisplay: 0 231 | m_HDR: 0 232 | m_OcclusionCulling: 1 233 | m_StereoConvergence: 10 234 | m_StereoSeparation: .0219999999 235 | --- !u!4 &1437328441 236 | Transform: 237 | m_ObjectHideFlags: 0 238 | m_PrefabParentObject: {fileID: 0} 239 | m_PrefabInternal: {fileID: 0} 240 | m_GameObject: {fileID: 1437328436} 241 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 242 | m_LocalPosition: {x: 0, y: 1, z: -10} 243 | m_LocalScale: {x: 1, y: 1, z: 1} 244 | m_Children: [] 245 | m_Father: {fileID: 0} 246 | m_RootOrder: 0 247 | --- !u!1 &1781452261 248 | GameObject: 249 | m_ObjectHideFlags: 0 250 | m_PrefabParentObject: {fileID: 0} 251 | m_PrefabInternal: {fileID: 0} 252 | serializedVersion: 4 253 | m_Component: 254 | - 4: {fileID: 1781452263} 255 | - 108: {fileID: 1781452262} 256 | m_Layer: 0 257 | m_Name: Directional Light 258 | m_TagString: Untagged 259 | m_Icon: {fileID: 0} 260 | m_NavMeshLayer: 0 261 | m_StaticEditorFlags: 0 262 | m_IsActive: 1 263 | --- !u!108 &1781452262 264 | Light: 265 | m_ObjectHideFlags: 0 266 | m_PrefabParentObject: {fileID: 0} 267 | m_PrefabInternal: {fileID: 0} 268 | m_GameObject: {fileID: 1781452261} 269 | m_Enabled: 1 270 | serializedVersion: 6 271 | m_Type: 1 272 | m_Color: {r: 1, g: .956862748, b: .839215696, a: 1} 273 | m_Intensity: 1 274 | m_Range: 10 275 | m_SpotAngle: 30 276 | m_CookieSize: 10 277 | m_Shadows: 278 | m_Type: 2 279 | m_Resolution: -1 280 | m_Strength: 1 281 | m_Bias: .0500000007 282 | m_NormalBias: .400000006 283 | m_Cookie: {fileID: 0} 284 | m_DrawHalo: 0 285 | m_Flare: {fileID: 0} 286 | m_RenderMode: 0 287 | m_CullingMask: 288 | serializedVersion: 2 289 | m_Bits: 4294967295 290 | m_Lightmapping: 4 291 | m_BounceIntensity: 1 292 | m_ShadowRadius: 0 293 | m_ShadowAngle: 0 294 | m_AreaSize: {x: 1, y: 1} 295 | --- !u!4 &1781452263 296 | Transform: 297 | m_ObjectHideFlags: 0 298 | m_PrefabParentObject: {fileID: 0} 299 | m_PrefabInternal: {fileID: 0} 300 | m_GameObject: {fileID: 1781452261} 301 | m_LocalRotation: {x: .408217937, y: -.234569728, z: .109381676, w: .875426054} 302 | m_LocalPosition: {x: 0, y: 3, z: 0} 303 | m_LocalScale: {x: 1, y: 1, z: 1} 304 | m_Children: [] 305 | m_Father: {fileID: 0} 306 | m_RootOrder: 1 307 | --------------------------------------------------------------------------------