diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayTracked.prefab b/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayTracked.prefab
index f7af885..8281eb0 100644
--- a/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayTracked.prefab
+++ b/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayTracked.prefab
@@ -1,39 +1,5 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
---- !u!1 &131732
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 431732}
- - 114: {fileID: 11431730}
- - 20: {fileID: 2017596}
- m_Layer: 0
- m_Name: RightEye
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!1 &131734
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 431734}
- - 114: {fileID: 11431732}
- - 20: {fileID: 2017594}
- m_Layer: 0
- m_Name: LeftEye
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
--- !u!1 &131736
GameObject:
m_ObjectHideFlags: 0
@@ -42,42 +8,15 @@ GameObject:
serializedVersion: 4
m_Component:
- 4: {fileID: 431736}
- - 20: {fileID: 2031736}
- - 81: {fileID: 8131736}
- - 114: {fileID: 11431734}
- - 114: {fileID: 11431736}
- - 114: {fileID: 11400556}
+ - 20: {fileID: 2065472}
+ - 114: {fileID: 11463916}
m_Layer: 0
m_Name: VRDisplayTracked
- m_TagString: Untagged
+ m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
---- !u!4 &431732
-Transform:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 131732}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 431736}
- m_RootOrder: 1
---- !u!4 &431734
-Transform:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 131734}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 431736}
- m_RootOrder: 0
--- !u!4 &431736
Transform:
m_ObjectHideFlags: 1
@@ -87,76 +26,10 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children:
- - {fileID: 431734}
- - {fileID: 431732}
+ m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
---- !u!20 &2017594
-Camera:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 131734}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: .300000012
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: 0
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_HDR: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: .0219999999
---- !u!20 &2017596
-Camera:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 131732}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: .300000012
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: 0
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_HDR: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: .0219999999
---- !u!20 &2031736
+--- !u!20 &2065472
Camera:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
@@ -165,7 +38,7 @@ Camera:
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
- m_BackGroundColor: {r: .257352948, g: .257352948, b: .257352948, a: .0196078438}
+ m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
@@ -177,7 +50,7 @@ Camera:
field of view: 60
orthographic: 0
orthographic size: 5
- m_Depth: 1
+ m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
@@ -188,65 +61,7 @@ Camera:
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
---- !u!81 &8131736
-AudioListener:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 131736}
- m_Enabled: 1
---- !u!114 &11400556
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 131736}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: a288e4aec9950634b83d232abc73d1bb, type: 3}
- m_Name:
- m_EditorClassIdentifier:
---- !u!114 &11431730
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 131732}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- eye: 1
- cachedTransform: {fileID: 0}
---- !u!114 &11431732
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 131734}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- eye: 0
- cachedTransform: {fileID: 0}
---- !u!114 &11431734
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 131736}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 425e251a3200841b98a61cd7234fc119, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- viewMode: 0
- stereoAmount: 1
- maxStereo: .0299999993
---- !u!114 &11431736
+--- !u!114 &11463916
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
@@ -254,10 +69,9 @@ MonoBehaviour:
m_GameObject: {fileID: 131736}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: d819a5e6a69cc5c46be733d8a56d387e, type: 3}
+ m_Script: {fileID: 11500000, guid: c2b982789045b4641a4c4898908314b3, type: 3}
m_Name:
m_EditorClassIdentifier:
- path: /me/head
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayUntracked.prefab b/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayUntracked.prefab
deleted file mode 100644
index 034281b..0000000
--- a/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayUntracked.prefab
+++ /dev/null
@@ -1,193 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!1 &100000
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 400000}
- - 20: {fileID: 2000000}
- - 81: {fileID: 8100000}
- - 114: {fileID: 11400000}
- - 114: {fileID: 11452958}
- m_Layer: 0
- m_Name: VRDisplayUntracked
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!1 &100002
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 400002}
- - 114: {fileID: 11400004}
- m_Layer: 0
- m_Name: LeftEye
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!1 &100004
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 400004}
- - 114: {fileID: 11400006}
- m_Layer: 0
- m_Name: RightEye
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!4 &400000
-Transform:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 100000}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children:
- - {fileID: 400002}
- - {fileID: 400004}
- m_Father: {fileID: 0}
- m_RootOrder: 0
---- !u!4 &400002
-Transform:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 100002}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 400000}
- m_RootOrder: 0
---- !u!4 &400004
-Transform:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 100004}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 400000}
- m_RootOrder: 1
---- !u!20 &2000000
-Camera:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 100000}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: .257352948, g: .257352948, b: .257352948, a: .0196078438}
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: .300000012
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: 1
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_HDR: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: .0219999999
---- !u!81 &8100000
-AudioListener:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 100000}
- m_Enabled: 1
---- !u!114 &11400000
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 100000}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 425e251a3200841b98a61cd7234fc119, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- viewMode: 0
- stereoAmount: 1
- maxStereo: .0299999993
---- !u!114 &11400004
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 100002}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- eye: 0
- cachedTransform: {fileID: 0}
---- !u!114 &11400006
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 100004}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- eye: 1
- cachedTransform: {fileID: 0}
---- !u!114 &11452958
-MonoBehaviour:
- m_ObjectHideFlags: 1
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 100100000}
- m_GameObject: {fileID: 100000}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: a288e4aec9950634b83d232abc73d1bb, type: 3}
- m_Name:
- m_EditorClassIdentifier:
---- !u!1001 &100100000
-Prefab:
- m_ObjectHideFlags: 1
- serializedVersion: 2
- m_Modification:
- m_TransformParent: {fileID: 0}
- m_Modifications: []
- m_RemovedComponents: []
- m_ParentPrefab: {fileID: 0}
- m_RootGameObject: {fileID: 100000}
- m_IsPrefabParent: 1
- m_IsExploded: 1
diff --git a/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayUntracked.prefab.meta b/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayUntracked.prefab.meta
deleted file mode 100644
index b6c4c45..0000000
--- a/OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayUntracked.prefab.meta
+++ /dev/null
@@ -1,4 +0,0 @@
-fileFormatVersion: 2
-guid: 2f29f6c553ca44b3c8777d52c87b2990
-NativeFormatImporter:
- userData:
diff --git a/OSVR-Unity/Assets/OSVRUnity/Sample/Demo/Scenes/OSVRDemo2.unity b/OSVR-Unity/Assets/OSVRUnity/Sample/Demo/Scenes/OSVRDemo2.unity
index 80e3bf3..d28aa8d 100644
--- a/OSVR-Unity/Assets/OSVRUnity/Sample/Demo/Scenes/OSVRDemo2.unity
+++ b/OSVR-Unity/Assets/OSVRUnity/Sample/Demo/Scenes/OSVRDemo2.unity
@@ -73,6 +73,7 @@ NavMeshSettings:
minRegionArea: 2
widthInaccuracy: 16.666666
heightInaccuracy: 10
+ tileSizeHint: 0
m_NavMesh: {fileID: 0}
--- !u!1 &30142522
GameObject:
@@ -1379,6 +1380,50 @@ Transform:
m_Children: []
m_Father: {fileID: 561713191}
m_RootOrder: 22
+--- !u!1001 &949264008
+Prefab:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ m_TransformParent: {fileID: 0}
+ m_Modifications:
+ - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ propertyPath: m_LocalRotation.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ propertyPath: m_LocalRotation.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ propertyPath: m_RootOrder
+ value: 1
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_ParentPrefab: {fileID: 100100000, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ m_RootGameObject: {fileID: 1959319991}
+ m_IsPrefabParent: 0
+ m_IsExploded: 1
--- !u!1 &1021825778
GameObject:
m_ObjectHideFlags: 0
@@ -1448,82 +1493,6 @@ Transform:
m_Children: []
m_Father: {fileID: 561713191}
m_RootOrder: 3
---- !u!1 &1037669522
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 131734, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 1037669523}
- - 114: {fileID: 1037669524}
- - 20: {fileID: 1037669526}
- m_Layer: 0
- m_Name: LeftEye
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!4 &1037669523
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 431734, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1037669522}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 1980142985}
- m_RootOrder: 0
---- !u!114 &1037669524
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11431732, guid: bcbb49b5078d05d498ef83a6373ba939,
- type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1037669522}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- eye: 0
- cachedTransform: {fileID: 0}
---- !u!20 &1037669526
-Camera:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 2017594, guid: bcbb49b5078d05d498ef83a6373ba939,
- type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1037669522}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: .300000012
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: 0
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_HDR: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: .0219999999
--- !u!1 &1093266603
GameObject:
m_ObjectHideFlags: 0
@@ -2119,126 +2088,6 @@ Transform:
m_Children: []
m_Father: {fileID: 561713191}
m_RootOrder: 23
---- !u!1 &1783028369
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 131732, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 1783028370}
- - 114: {fileID: 1783028371}
- - 20: {fileID: 1783028373}
- m_Layer: 0
- m_Name: RightEye
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!4 &1783028370
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 431732, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1783028369}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 1980142985}
- m_RootOrder: 1
---- !u!114 &1783028371
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11431730, guid: bcbb49b5078d05d498ef83a6373ba939,
- type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1783028369}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- eye: 1
- cachedTransform: {fileID: 0}
---- !u!20 &1783028373
-Camera:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 2017596, guid: bcbb49b5078d05d498ef83a6373ba939,
- type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1783028369}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: .300000012
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: 0
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_HDR: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: .0219999999
---- !u!1001 &1814406294
-Prefab:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- m_TransformParent: {fileID: 0}
- m_Modifications:
- - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- propertyPath: m_LocalPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- propertyPath: m_LocalPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- propertyPath: m_LocalPosition.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- propertyPath: m_LocalRotation.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- propertyPath: m_LocalRotation.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- propertyPath: m_LocalRotation.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- propertyPath: m_RootOrder
- value: 1
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_ParentPrefab: {fileID: 100100000, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- m_RootGameObject: {fileID: 1980142979}
- m_IsPrefabParent: 0
- m_IsExploded: 1
--- !u!1 &1837879391
GameObject:
m_ObjectHideFlags: 0
@@ -2478,6 +2327,80 @@ Transform:
m_Children: []
m_Father: {fileID: 561713191}
m_RootOrder: 18
+--- !u!1 &1959319991
+GameObject:
+ m_ObjectHideFlags: 0
+ m_PrefabParentObject: {fileID: 131736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ m_PrefabInternal: {fileID: 949264008}
+ serializedVersion: 4
+ m_Component:
+ - 4: {fileID: 1959319995}
+ - 20: {fileID: 1959319993}
+ - 114: {fileID: 1959319992}
+ m_Layer: 0
+ m_Name: VRDisplayTracked
+ m_TagString: MainCamera
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!114 &1959319992
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_PrefabParentObject: {fileID: 11463916, guid: bcbb49b5078d05d498ef83a6373ba939,
+ type: 2}
+ m_PrefabInternal: {fileID: 949264008}
+ m_GameObject: {fileID: 1959319991}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: c2b982789045b4641a4c4898908314b3, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+--- !u!20 &1959319993
+Camera:
+ m_ObjectHideFlags: 0
+ m_PrefabParentObject: {fileID: 2065472, guid: bcbb49b5078d05d498ef83a6373ba939,
+ type: 2}
+ m_PrefabInternal: {fileID: 949264008}
+ m_GameObject: {fileID: 1959319991}
+ m_Enabled: 1
+ serializedVersion: 2
+ m_ClearFlags: 1
+ m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
+ m_NormalizedViewPortRect:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ near clip plane: .00999999978
+ far clip plane: 1000
+ field of view: 60
+ orthographic: 0
+ orthographic size: 5
+ m_Depth: 0
+ m_CullingMask:
+ serializedVersion: 2
+ m_Bits: 4294967295
+ m_RenderingPath: -1
+ m_TargetTexture: {fileID: 0}
+ m_TargetDisplay: 0
+ m_HDR: 0
+ m_OcclusionCulling: 1
+ m_StereoConvergence: 10
+ m_StereoSeparation: .0219999999
+--- !u!4 &1959319995
+Transform:
+ m_ObjectHideFlags: 0
+ m_PrefabParentObject: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
+ m_PrefabInternal: {fileID: 949264008}
+ m_GameObject: {fileID: 1959319991}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 1
--- !u!1 &1964471395
GameObject:
m_ObjectHideFlags: 0
@@ -2632,121 +2555,6 @@ Transform:
m_Children: []
m_Father: {fileID: 561713191}
m_RootOrder: 19
---- !u!1 &1980142979
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 131736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 1980142985}
- - 20: {fileID: 1980142984}
- - 81: {fileID: 1980142983}
- - 114: {fileID: 1980142982}
- - 114: {fileID: 1980142981}
- - 114: {fileID: 1980142980}
- m_Layer: 0
- m_Name: VRDisplayTracked
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &1980142980
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11400556, guid: bcbb49b5078d05d498ef83a6373ba939,
- type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1980142979}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: a288e4aec9950634b83d232abc73d1bb, type: 3}
- m_Name:
- m_EditorClassIdentifier:
---- !u!114 &1980142981
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11431736, guid: bcbb49b5078d05d498ef83a6373ba939,
- type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1980142979}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: d819a5e6a69cc5c46be733d8a56d387e, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- path: /me/head
---- !u!114 &1980142982
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11431734, guid: bcbb49b5078d05d498ef83a6373ba939,
- type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1980142979}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 425e251a3200841b98a61cd7234fc119, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- viewMode: 0
- stereoAmount: 1
- maxStereo: .0299999993
---- !u!81 &1980142983
-AudioListener:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 8131736, guid: bcbb49b5078d05d498ef83a6373ba939,
- type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1980142979}
- m_Enabled: 1
---- !u!20 &1980142984
-Camera:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 2031736, guid: bcbb49b5078d05d498ef83a6373ba939,
- type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1980142979}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: .257352948, g: .257352948, b: .257352948, a: .0196078438}
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: .00999999978
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: 1
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_HDR: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: .0219999999
---- !u!4 &1980142985
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
- m_PrefabInternal: {fileID: 1814406294}
- m_GameObject: {fileID: 1980142979}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children:
- - {fileID: 1037669523}
- - {fileID: 1783028370}
- m_Father: {fileID: 0}
- m_RootOrder: 1
--- !u!1 &2014212484
GameObject:
m_ObjectHideFlags: 0
diff --git a/OSVR-Unity/Assets/OSVRUnity/Sample/UntrackedVRDisplayDemo.unity b/OSVR-Unity/Assets/OSVRUnity/Sample/UntrackedVRDisplayDemo.unity
deleted file mode 100644
index 1d40079..0000000
--- a/OSVR-Unity/Assets/OSVRUnity/Sample/UntrackedVRDisplayDemo.unity
+++ /dev/null
@@ -1,1540 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!29 &1
-SceneSettings:
- m_ObjectHideFlags: 0
- m_PVSData:
- m_PVSObjectsArray: []
- m_PVSPortalsArray: []
- m_OcclusionBakeSettings:
- smallestOccluder: 5
- smallestHole: .25
- backfaceThreshold: 100
---- !u!104 &2
-RenderSettings:
- m_Fog: 0
- m_FogColor: {r: .5, g: .5, b: .5, a: 1}
- m_FogMode: 3
- m_FogDensity: .00999999978
- m_LinearFogStart: 0
- m_LinearFogEnd: 300
- m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1}
- m_SkyboxMaterial: {fileID: 0}
- m_HaloStrength: .5
- m_FlareStrength: 1
- m_FlareFadeSpeed: 3
- m_HaloTexture: {fileID: 0}
- m_SpotCookie: {fileID: 0}
- m_ObjectHideFlags: 0
---- !u!127 &3
-LevelGameManager:
- m_ObjectHideFlags: 0
---- !u!157 &4
-LightmapSettings:
- m_ObjectHideFlags: 0
- m_LightProbes: {fileID: 0}
- m_Lightmaps: []
- m_LightmapsMode: 1
- m_BakedColorSpace: 0
- m_UseDualLightmapsInForward: 0
- m_LightmapEditorSettings:
- m_Resolution: 50
- m_LastUsedResolution: 0
- m_TextureWidth: 1024
- m_TextureHeight: 1024
- m_BounceBoost: 1
- m_BounceIntensity: 1
- m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1}
- m_SkyLightIntensity: 0
- m_Quality: 0
- m_Bounces: 1
- m_FinalGatherRays: 1000
- m_FinalGatherContrastThreshold: .0500000007
- m_FinalGatherGradientThreshold: 0
- m_FinalGatherInterpolationPoints: 15
- m_AOAmount: 0
- m_AOMaxDistance: .100000001
- m_AOContrast: 1
- m_LODSurfaceMappingDistance: 1
- m_Padding: 0
- m_TextureCompression: 0
- m_LockAtlas: 0
---- !u!196 &5
-NavMeshSettings:
- m_ObjectHideFlags: 0
- m_BuildSettings:
- agentRadius: .5
- agentHeight: 2
- agentSlope: 45
- agentClimb: .400000006
- ledgeDropHeight: 0
- maxJumpAcrossDistance: 0
- accuratePlacement: 0
- minRegionArea: 2
- widthInaccuracy: 16.666666
- heightInaccuracy: 10
- m_NavMesh: {fileID: 0}
---- !u!1 &546153132
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 546153136}
- - 198: {fileID: 546153135}
- - 199: {fileID: 546153134}
- m_Layer: 0
- m_Name: Particle System
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!199 &546153134
-ParticleSystemRenderer:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 546153132}
- m_Enabled: 1
- m_CastShadows: 1
- m_ReceiveShadows: 1
- m_LightmapIndex: 255
- m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
- m_Materials:
- - {fileID: 2100000, guid: 6e645f023b55516478a849809e38d9ac, type: 2}
- m_SubsetIndices:
- m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 0
- m_LightProbeAnchor: {fileID: 0}
- m_ScaleInLightmap: 1
- m_SortingLayerID: 0
- m_SortingOrder: 0
- m_RenderMode: 4
- m_MaxParticleSize: 1
- m_CameraVelocityScale: 0
- m_VelocityScale: 0
- m_LengthScale: 2
- m_SortingFudge: 0
- m_NormalDirection: 1
- m_SortMode: 0
- m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
- m_Mesh1: {fileID: 0}
- m_Mesh2: {fileID: 0}
- m_Mesh3: {fileID: 0}
---- !u!198 &546153135
-ParticleSystem:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 546153132}
- lengthInSec: 5
- startDelay: 0
- speed: 1
- randomSeed: 0
- looping: 0
- prewarm: 0
- playOnAwake: 1
- moveWithTransform: 1
- InitialModule:
- enabled: 1
- startLifetime:
- scalar: 99999
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- startSpeed:
- scalar: 0
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- startColor:
- maxGradient:
- key0:
- serializedVersion: 2
- rgba: 4294967295
- key1:
- serializedVersion: 2
- rgba: 4294967295
- key2:
- serializedVersion: 2
- rgba: 0
- key3:
- serializedVersion: 2
- rgba: 0
- key4:
- serializedVersion: 2
- rgba: 0
- key5:
- serializedVersion: 2
- rgba: 0
- key6:
- serializedVersion: 2
- rgba: 0
- key7:
- serializedVersion: 2
- rgba: 0
- ctime0: 0
- ctime1: 65535
- ctime2: 0
- ctime3: 0
- ctime4: 0
- ctime5: 0
- ctime6: 0
- ctime7: 0
- atime0: 0
- atime1: 65535
- atime2: 0
- atime3: 0
- atime4: 0
- atime5: 0
- atime6: 0
- atime7: 0
- m_NumColorKeys: 2
- m_NumAlphaKeys: 2
- minGradient:
- key0:
- serializedVersion: 2
- rgba: 4294967295
- key1:
- serializedVersion: 2
- rgba: 4294967295
- key2:
- serializedVersion: 2
- rgba: 0
- key3:
- serializedVersion: 2
- rgba: 0
- key4:
- serializedVersion: 2
- rgba: 0
- key5:
- serializedVersion: 2
- rgba: 0
- key6:
- serializedVersion: 2
- rgba: 0
- key7:
- serializedVersion: 2
- rgba: 0
- ctime0: 0
- ctime1: 65535
- ctime2: 0
- ctime3: 0
- ctime4: 0
- ctime5: 0
- ctime6: 0
- ctime7: 0
- atime0: 0
- atime1: 65535
- atime2: 0
- atime3: 0
- atime4: 0
- atime5: 0
- atime6: 0
- atime7: 0
- m_NumColorKeys: 2
- m_NumAlphaKeys: 2
- minColor:
- serializedVersion: 2
- rgba: 4294967295
- maxColor:
- serializedVersion: 2
- rgba: 4294967295
- minMaxState: 0
- startSize:
- scalar: 3
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: .333333343
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 3
- startRotation:
- scalar: 3.1415925
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 3
- gravityModifier: 0
- inheritVelocity: 0
- maxNumParticles: 1000
- ShapeModule:
- serializedVersion: 2
- enabled: 1
- type: 1
- radius: 23.3500004
- angle: 25
- length: 5
- boxX: 1
- boxY: 1
- boxZ: 1
- placementMode: 0
- m_Mesh: {fileID: 0}
- randomDirection: 0
- EmissionModule:
- enabled: 1
- m_Type: 0
- rate:
- scalar: 0
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- cnt0: 300
- cnt1: 30
- cnt2: 30
- cnt3: 30
- time0: 0
- time1: 0
- time2: 0
- time3: 0
- m_BurstCount: 1
- SizeModule:
- enabled: 0
- curve:
- scalar: 1
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 1
- RotationModule:
- enabled: 1
- curve:
- scalar: .785398126
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: -1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 3
- ColorModule:
- enabled: 0
- gradient:
- maxGradient:
- key0:
- serializedVersion: 2
- rgba: 4294967295
- key1:
- serializedVersion: 2
- rgba: 4294967295
- key2:
- serializedVersion: 2
- rgba: 0
- key3:
- serializedVersion: 2
- rgba: 0
- key4:
- serializedVersion: 2
- rgba: 0
- key5:
- serializedVersion: 2
- rgba: 0
- key6:
- serializedVersion: 2
- rgba: 0
- key7:
- serializedVersion: 2
- rgba: 0
- ctime0: 0
- ctime1: 65535
- ctime2: 0
- ctime3: 0
- ctime4: 0
- ctime5: 0
- ctime6: 0
- ctime7: 0
- atime0: 0
- atime1: 65535
- atime2: 0
- atime3: 0
- atime4: 0
- atime5: 0
- atime6: 0
- atime7: 0
- m_NumColorKeys: 2
- m_NumAlphaKeys: 2
- minGradient:
- key0:
- serializedVersion: 2
- rgba: 4294967295
- key1:
- serializedVersion: 2
- rgba: 4294967295
- key2:
- serializedVersion: 2
- rgba: 0
- key3:
- serializedVersion: 2
- rgba: 0
- key4:
- serializedVersion: 2
- rgba: 0
- key5:
- serializedVersion: 2
- rgba: 0
- key6:
- serializedVersion: 2
- rgba: 0
- key7:
- serializedVersion: 2
- rgba: 0
- ctime0: 0
- ctime1: 65535
- ctime2: 0
- ctime3: 0
- ctime4: 0
- ctime5: 0
- ctime6: 0
- ctime7: 0
- atime0: 0
- atime1: 65535
- atime2: 0
- atime3: 0
- atime4: 0
- atime5: 0
- atime6: 0
- atime7: 0
- m_NumColorKeys: 2
- m_NumAlphaKeys: 2
- minColor:
- serializedVersion: 2
- rgba: 4294967295
- maxColor:
- serializedVersion: 2
- rgba: 4294967295
- minMaxState: 1
- UVModule:
- enabled: 0
- frameOverTime:
- scalar: 1
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 1
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 1
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 1
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 1
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 1
- tilesX: 1
- tilesY: 1
- animationType: 0
- rowIndex: 0
- cycles: 1
- randomRow: 1
- VelocityModule:
- enabled: 0
- x:
- scalar: 0
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- y:
- scalar: 0
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- z:
- scalar: 0
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- inWorldSpace: 0
- ForceModule:
- enabled: 0
- x:
- scalar: 0
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- y:
- scalar: 0
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- z:
- scalar: 0
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- inWorldSpace: 0
- randomizePerFrame: 0
- ExternalForcesModule:
- enabled: 0
- multiplier: 1
- ClampVelocityModule:
- enabled: 0
- x:
- scalar: 1
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- y:
- scalar: 1
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- z:
- scalar: 1
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- magnitude:
- scalar: 1
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- separateAxis: 0
- inWorldSpace: 0
- dampen: 1
- SizeBySpeedModule:
- enabled: 0
- curve:
- scalar: 1
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 1
- range: {x: 0, y: 1}
- RotationBySpeedModule:
- enabled: 0
- curve:
- scalar: .785398185
- maxCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minCurve:
- serializedVersion: 2
- m_Curve:
- - time: 0
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- - time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- minMaxState: 0
- range: {x: 0, y: 1}
- ColorBySpeedModule:
- enabled: 0
- gradient:
- maxGradient:
- key0:
- serializedVersion: 2
- rgba: 4294967295
- key1:
- serializedVersion: 2
- rgba: 4294967295
- key2:
- serializedVersion: 2
- rgba: 0
- key3:
- serializedVersion: 2
- rgba: 0
- key4:
- serializedVersion: 2
- rgba: 0
- key5:
- serializedVersion: 2
- rgba: 0
- key6:
- serializedVersion: 2
- rgba: 0
- key7:
- serializedVersion: 2
- rgba: 0
- ctime0: 0
- ctime1: 65535
- ctime2: 0
- ctime3: 0
- ctime4: 0
- ctime5: 0
- ctime6: 0
- ctime7: 0
- atime0: 0
- atime1: 65535
- atime2: 0
- atime3: 0
- atime4: 0
- atime5: 0
- atime6: 0
- atime7: 0
- m_NumColorKeys: 2
- m_NumAlphaKeys: 2
- minGradient:
- key0:
- serializedVersion: 2
- rgba: 4294967295
- key1:
- serializedVersion: 2
- rgba: 4294967295
- key2:
- serializedVersion: 2
- rgba: 0
- key3:
- serializedVersion: 2
- rgba: 0
- key4:
- serializedVersion: 2
- rgba: 0
- key5:
- serializedVersion: 2
- rgba: 0
- key6:
- serializedVersion: 2
- rgba: 0
- key7:
- serializedVersion: 2
- rgba: 0
- ctime0: 0
- ctime1: 65535
- ctime2: 0
- ctime3: 0
- ctime4: 0
- ctime5: 0
- ctime6: 0
- ctime7: 0
- atime0: 0
- atime1: 65535
- atime2: 0
- atime3: 0
- atime4: 0
- atime5: 0
- atime6: 0
- atime7: 0
- m_NumColorKeys: 2
- m_NumAlphaKeys: 2
- minColor:
- serializedVersion: 2
- rgba: 4294967295
- maxColor:
- serializedVersion: 2
- rgba: 4294967295
- minMaxState: 1
- range: {x: 0, y: 1}
- CollisionModule:
- enabled: 0
- type: 0
- plane0: {fileID: 0}
- plane1: {fileID: 0}
- plane2: {fileID: 0}
- plane3: {fileID: 0}
- plane4: {fileID: 0}
- plane5: {fileID: 0}
- dampen: 0
- bounce: 1
- energyLossOnCollision: 0
- minKillSpeed: 0
- particleRadius: .00999999978
- collidesWith:
- serializedVersion: 2
- m_Bits: 4294967295
- quality: 0
- voxelSize: .5
- collisionMessages: 0
- SubModule:
- enabled: 0
- subEmitterBirth: {fileID: 0}
- subEmitterBirth1: {fileID: 0}
- subEmitterCollision: {fileID: 0}
- subEmitterCollision1: {fileID: 0}
- subEmitterDeath: {fileID: 0}
- subEmitterDeath1: {fileID: 0}
---- !u!4 &546153136
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 546153132}
- m_LocalRotation: {x: 0, y: .291102022, z: 0, w: .95669204}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 1
---- !u!1001 &795607871
-Prefab:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- m_TransformParent: {fileID: 0}
- m_Modifications:
- - target: {fileID: 400000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- propertyPath: m_LocalPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 400000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- propertyPath: m_LocalPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 400000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- propertyPath: m_LocalPosition.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 400000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- propertyPath: m_LocalRotation.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 400000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- propertyPath: m_LocalRotation.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 400000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- propertyPath: m_LocalRotation.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 400000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 400000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- propertyPath: m_RootOrder
- value: 0
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_ParentPrefab: {fileID: 100100000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- m_RootGameObject: {fileID: 955452065}
- m_IsPrefabParent: 0
- m_IsExploded: 1
---- !u!1 &917069207
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 136198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- m_PrefabInternal: {fileID: 1400362904}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 917069209}
- - 114: {fileID: 917069208}
- m_Layer: 0
- m_Name: ClientKit
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 4294967295
- m_IsActive: 1
---- !u!114 &917069208
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11436198, guid: 0b82dd794175b304a87805e4b38fbe84,
- type: 2}
- m_PrefabInternal: {fileID: 1400362904}
- m_GameObject: {fileID: 917069207}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: e2550bc6af558044baf4aa2ee88d5e8b, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- AppID: com.osvr.osvr-unity.sample.untrackeddisplay
---- !u!4 &917069209
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- m_PrefabInternal: {fileID: 1400362904}
- m_GameObject: {fileID: 917069207}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 2
---- !u!1 &955452065
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 100000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- m_PrefabInternal: {fileID: 795607871}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 955452066}
- - 20: {fileID: 955452068}
- - 81: {fileID: 955452069}
- - 114: {fileID: 955452067}
- - 114: {fileID: 955452070}
- m_Layer: 0
- m_Name: VRDisplayUntracked
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!4 &955452066
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 400000, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- m_PrefabInternal: {fileID: 795607871}
- m_GameObject: {fileID: 955452065}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children:
- - {fileID: 1468488791}
- - {fileID: 2061423056}
- m_Father: {fileID: 0}
- m_RootOrder: 0
---- !u!114 &955452067
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11400000, guid: 2f29f6c553ca44b3c8777d52c87b2990,
- type: 2}
- m_PrefabInternal: {fileID: 795607871}
- m_GameObject: {fileID: 955452065}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 425e251a3200841b98a61cd7234fc119, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- viewMode: 0
- stereoAmount: 1
- maxStereo: .0299999993
---- !u!20 &955452068
-Camera:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 2000000, guid: 2f29f6c553ca44b3c8777d52c87b2990,
- type: 2}
- m_PrefabInternal: {fileID: 795607871}
- m_GameObject: {fileID: 955452065}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: .257352948, g: .257352948, b: .257352948, a: .0196078438}
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: .300000012
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: 1
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_HDR: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: .0219999999
---- !u!81 &955452069
-AudioListener:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 8100000, guid: 2f29f6c553ca44b3c8777d52c87b2990,
- type: 2}
- m_PrefabInternal: {fileID: 795607871}
- m_GameObject: {fileID: 955452065}
- m_Enabled: 1
---- !u!114 &955452070
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11452958, guid: 2f29f6c553ca44b3c8777d52c87b2990,
- type: 2}
- m_PrefabInternal: {fileID: 795607871}
- m_GameObject: {fileID: 955452065}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: a288e4aec9950634b83d232abc73d1bb, type: 3}
- m_Name:
- m_EditorClassIdentifier:
---- !u!1001 &1400362904
-Prefab:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- m_TransformParent: {fileID: 0}
- m_Modifications:
- - target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- propertyPath: m_LocalPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- propertyPath: m_LocalPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- propertyPath: m_LocalPosition.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- propertyPath: m_LocalRotation.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- propertyPath: m_LocalRotation.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- propertyPath: m_LocalRotation.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- propertyPath: m_RootOrder
- value: 2
- objectReference: {fileID: 0}
- - target: {fileID: 11436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- propertyPath: AppID
- value: com.osvr.osvr-unity.sample.untrackeddisplay
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_ParentPrefab: {fileID: 100100000, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
- m_RootGameObject: {fileID: 917069207}
- m_IsPrefabParent: 0
- m_IsExploded: 1
---- !u!1 &1468488789
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 100002, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- m_PrefabInternal: {fileID: 795607871}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 1468488791}
- - 114: {fileID: 1468488790}
- m_Layer: 0
- m_Name: LeftEye
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &1468488790
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11400004, guid: 2f29f6c553ca44b3c8777d52c87b2990,
- type: 2}
- m_PrefabInternal: {fileID: 795607871}
- m_GameObject: {fileID: 1468488789}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- eye: 0
- cachedTransform: {fileID: 0}
---- !u!4 &1468488791
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 400002, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- m_PrefabInternal: {fileID: 795607871}
- m_GameObject: {fileID: 1468488789}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 955452066}
- m_RootOrder: 0
---- !u!1 &1652852721
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 1652852723}
- - 108: {fileID: 1652852722}
- m_Layer: 0
- m_Name: Directional light
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!108 &1652852722
-Light:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1652852721}
- m_Enabled: 1
- serializedVersion: 3
- m_Type: 1
- m_Color: {r: 1, g: 1, b: 1, a: 1}
- m_Intensity: .5
- m_Range: 10
- m_SpotAngle: 30
- m_CookieSize: 10
- m_Shadows:
- m_Type: 0
- m_Resolution: -1
- m_Strength: 1
- m_Bias: .0500000007
- m_Softness: 4
- m_SoftnessFade: 1
- m_Cookie: {fileID: 0}
- m_DrawHalo: 0
- m_ActuallyLightmapped: 0
- m_Flare: {fileID: 0}
- m_RenderMode: 0
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_Lightmapping: 1
- m_ShadowSamples: 1
- m_ShadowRadius: 0
- m_ShadowAngle: 0
- m_IndirectIntensity: 1
- m_AreaSize: {x: 1, y: 1}
---- !u!4 &1652852723
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1652852721}
- m_LocalRotation: {x: .408217937, y: -.234569728, z: .109381661, w: .875426114}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 3
---- !u!1 &2061423055
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 100004, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- m_PrefabInternal: {fileID: 795607871}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 2061423056}
- - 114: {fileID: 2061423057}
- m_Layer: 0
- m_Name: RightEye
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!4 &2061423056
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 400004, guid: 2f29f6c553ca44b3c8777d52c87b2990, type: 2}
- m_PrefabInternal: {fileID: 795607871}
- m_GameObject: {fileID: 2061423055}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 955452066}
- m_RootOrder: 1
---- !u!114 &2061423057
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 11400006, guid: 2f29f6c553ca44b3c8777d52c87b2990,
- type: 2}
- m_PrefabInternal: {fileID: 795607871}
- m_GameObject: {fileID: 2061423055}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 490e571217a2247e395abfef67b70c89, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- eye: 1
- cachedTransform: {fileID: 0}
diff --git a/OSVR-Unity/Assets/OSVRUnity/Sample/UntrackedVRDisplayDemo.unity.meta b/OSVR-Unity/Assets/OSVRUnity/Sample/UntrackedVRDisplayDemo.unity.meta
deleted file mode 100644
index 336149c..0000000
--- a/OSVR-Unity/Assets/OSVRUnity/Sample/UntrackedVRDisplayDemo.unity.meta
+++ /dev/null
@@ -1,4 +0,0 @@
-fileFormatVersion: 2
-guid: 49ad6b7bb0f0b8d438b0e72af6749afb
-DefaultImporter:
- userData:
diff --git a/OSVR-Unity/Assets/OSVRUnity/Shaders.meta b/OSVR-Unity/Assets/OSVRUnity/Shaders.meta
new file mode 100644
index 0000000..b422fba
--- /dev/null
+++ b/OSVR-Unity/Assets/OSVRUnity/Shaders.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: eb87196b7c9d3384688b8bf024845362
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/ClientKit.cs b/OSVR-Unity/Assets/OSVRUnity/src/ClientKit.cs
index 652bfff..6eeacdd 100644
--- a/OSVR-Unity/Assets/OSVRUnity/src/ClientKit.cs
+++ b/OSVR-Unity/Assets/OSVRUnity/src/ClientKit.cs
@@ -29,7 +29,7 @@ public class ClientKit : MonoBehaviour
[Tooltip("A string uniquely identifying your application, in reverse domain-name format.")]
public string AppID;
- private OSVR.ClientKit.ClientContext contextObject;
+ private OSVR.ClientKit.ClientContext _contextObject;
/// Uses the Unity "Persistent Singleton" pattern, see http://unitypatterns.com/singletons/
private static ClientKit _instance;
@@ -66,13 +66,13 @@ public OSVR.ClientKit.ClientContext context
get
{
EnsureStarted();
- return contextObject;
+ return _contextObject;
}
}
private void EnsureStarted()
{
- if (contextObject == null)
+ if (_contextObject == null)
{
if (0 == AppID.Length)
{
@@ -80,7 +80,7 @@ private void EnsureStarted()
AppID = "com.osvr.osvr-unity.dummy";
}
Debug.Log("[OSVR] Starting with app ID: " + AppID);
- contextObject = new OSVR.ClientKit.ClientContext(AppID, 0);
+ _contextObject = new OSVR.ClientKit.ClientContext(AppID, 0);
}
}
@@ -113,32 +113,24 @@ void OnEnable()
Debug.Log("[OSVR] In OnEnable()");
EnsureStarted();
}
-
- void FixedUpdate()
- {
- EnsureStarted();
- contextObject.update();
- }
-
- //may seem superfluous. the goal here is to update the client more often to make sure we have the most recent tracker data
- //this helps reduce latency
+
void Update()
{
- contextObject.update();
+ EnsureStarted();
+ _contextObject.update();
}
- //may seem superfluous. the goal here is to update the client more often to make sure we have the most recent tracker data
- //this helps reduce latency
+
void LateUpdate()
{
- contextObject.update();
+ _contextObject.update();
}
void Stop()
{
- if (null != contextObject)
+ if (null != _contextObject)
{
Debug.Log("Shutting down OSVR.");
- contextObject.Dispose();
- contextObject = null;
+ _contextObject.Dispose();
+ _contextObject = null;
}
}
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/DeviceDescriptor.cs b/OSVR-Unity/Assets/OSVRUnity/src/DeviceDescriptor.cs
deleted file mode 100644
index 830d00c..0000000
--- a/OSVR-Unity/Assets/OSVRUnity/src/DeviceDescriptor.cs
+++ /dev/null
@@ -1,347 +0,0 @@
-/// OSVR-Unity Connection
-///
-/// http://sensics.com/osvr
-///
-///
-/// Copyright 2014 Sensics, Inc.
-///
-/// Licensed under the Apache License, Version 2.0 (the "License");
-/// you may not use this file except in compliance with the License.
-/// You may obtain a copy of the License at
-///
-/// http://www.apache.org/licenses/LICENSE-2.0
-///
-/// Unless required by applicable law or agreed to in writing, software
-/// distributed under the License is distributed on an "AS IS" BASIS,
-/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-/// See the License for the specific language governing permissions and
-/// limitations under the License.
-///
-
-using UnityEngine;
-using System.Collections;
-using System.Text;
-
-//a class for storing information about a device based on it's json descriptor file
-using Newtonsoft.Json;
-using System.IO;
-using System;
-
-
-public class DeviceDescriptor
-{
- //hmd
- private string _vendor = "";
- public string Vendor
- {
- get { return _vendor; }
- set { _vendor = value; }
- }
- private string _model = "";
- public string Model
- {
- get { return _model; }
- set { _model = value; }
- }
- private string _version;
- public string Version
- {
- get { return _version; }
- set { _version = value; }
- }
- private string _note = "";
- public string Note
- {
- get { return _note; }
- set { _note = value; }
- }
- private int _numDisplays = 1;
- public int NumDisplays
- {
- get { return _numDisplays; }
- set { _numDisplays = value; }
- }
- //field of view
- private float _monocularHorizontal = 60f;
- public float MonocularHorizontal
- {
- get { return _monocularHorizontal; }
- set { _monocularHorizontal = value; }
- }
- private float _monocularVertical = 60f;
- public float MonocularVertical
- {
- get { return _monocularVertical; }
- set { _monocularVertical = value; }
- }
- private float _overlapPercent = 100f;
- public float OverlapPercent
- {
- get { return _overlapPercent; }
- set { _overlapPercent = value; }
- }
- private float _pitchTilt = 0;
- public float PitchTilt
- {
- get { return _pitchTilt; }
- set { _pitchTilt = value; }
- }
- //resolutions
- private int _width = 1920;
- public int Width
- {
- get { return _width; }
- set { _width = value; }
- }
- private int _height = 1080;
- public int Height
- {
- get { return _height; }
- set { _height = value; }
- }
- private int _videoInputs = 1;
- public int VideoInputs
- {
- get { return _videoInputs; }
- set { _videoInputs = value; }
- }
- private string _displayMode = "horz_side_by_side";
- public string DisplayMode
- {
- get { return _displayMode; }
- set { _displayMode = value; }
- }
- private int _swapEyes = 0;
- public int SwapEyes
- {
- get { return _swapEyes; }
- set { _swapEyes = value; }
- }
-
- //distortion
- private float _k1Red = 0;
- public float K1Red
- {
- get { return _k1Red; }
- set { _k1Red = value; }
- }
- private float _k1Green = 0;
- public float K1Green
- {
- get { return _k1Green; }
- set { _k1Green = value; }
- }
- private float _k1Blue = 0;
- public float K1Blue
- {
- get { return _k1Blue; }
- set { _k1Blue = value; }
- }
- //rendering
- private float _leftRoll = 0;
- public float LeftRoll
- {
- get { return _leftRoll; }
- set { _leftRoll = value; }
- }
- private float _rightRoll = 0;
- public float RightRoll
- {
- get { return _rightRoll; }
- set { _rightRoll = value; }
- }
- //eyes
- private float _centerProjX = 0.5f;
- public float CenterProjX
- {
- get { return _centerProjX; }
- set { _centerProjX = value; }
- }
- private float _centerProjY = 0.5f;
- public float CenterProjY
- {
- get { return _centerProjY; }
- set { _centerProjY = value; }
- }
- private int _rotate180 = 0;
- public int Rotate180
- {
- get { return _rotate180; }
- set { _rotate180 = value; }
- }
-
- //constructors
- public DeviceDescriptor() { }
- public DeviceDescriptor(string vendor, string model, string version, int numDisplays, string note, float monocularHorizontal,
- float monocularVertical, float overlapPercent, float pitchTilt, int width, int height, int videoInputs, string displayMode, int swapEyes,
- float k1Red, float k1Green, float k1Blue, float leftRoll, float rightRoll, float centerProjX, float centerProjY, int rotate180)
- {
- this._vendor = vendor;
- this._model = model;
- this._version = version;
- this._numDisplays = numDisplays;
- this._note = note;
- this._monocularHorizontal = monocularHorizontal;
- this._monocularVertical = monocularVertical;
- this._overlapPercent = overlapPercent;
- this._pitchTilt = pitchTilt;
- this._width = width;
- this._height = height;
- this._videoInputs = videoInputs;
- this._displayMode = displayMode;
- this._swapEyes = swapEyes;
- this._k1Red = k1Red;
- this._k1Green = k1Green;
- this._k1Blue = k1Blue;
- this._leftRoll = leftRoll;
- this._rightRoll = rightRoll;
- this._centerProjX = centerProjX;
- this._centerProjY = centerProjY;
- this._rotate180 = rotate180;
- }
-
- public override string ToString()
- {
- //print
- StringBuilder jsonPrinter = new StringBuilder(64);
- jsonPrinter.AppendLine("Json File Device Description:")
- .Append("HMD\n")
- .Append("vendor = ").AppendLine(Vendor)
- .Append("model = ").AppendLine(Model)
- .Append("version = ").AppendLine(Version)
- .Append("num_displays = ").AppendLine(NumDisplays.ToString())
- .Append("notes = ").AppendLine(Note)
- .Append("\nFIELD OF VIEW\n")
- .Append("monocular_horizontal = ").AppendLine(MonocularHorizontal.ToString())
- .Append("monocular_vertical = ").AppendLine(MonocularVertical.ToString())
- .Append("overlap_percent = ").AppendLine(OverlapPercent.ToString())
- .Append("pitch_tilt = ").AppendLine(PitchTilt.ToString())
- .Append("\nRESOLUTION\n")
- .Append("width = ").AppendLine(Width.ToString())
- .Append("height = ").AppendLine(Height.ToString())
- .Append("video_inputs = ").AppendLine(VideoInputs.ToString())
- .Append("display_mode = ").AppendLine(DisplayMode)
- .Append("swapEyes = ").AppendLine(SwapEyes.ToString())
- .Append("\nDISTORTION\n")
- .Append("k1_red = ").AppendLine(K1Red.ToString())
- .Append("k1_green = ").AppendLine(K1Green.ToString())
- .Append("k1_blue = ").AppendLine(K1Blue.ToString())
- .Append("\nRENDERING\n")
- .Append("left_roll = ").AppendLine(LeftRoll.ToString())
- .Append("right_roll = ").AppendLine(RightRoll.ToString())
- .Append("\nEYES\n")
- .Append("center_proj_x = ").AppendLine(CenterProjX.ToString())
- .Append("center_proj_y = ").AppendLine(CenterProjY.ToString())
- .Append("rotate_180 = ").AppendLine(Rotate180.ToString());
- return jsonPrinter.ToString();
- }
-
- ///
- /// This function will parse the device parameters from a device descriptor json file using Newstonsoft
- ///
- /// Returns a DeviceDescriptor object containing stored json values.
- ///
- public static DeviceDescriptor Parse(string deviceDescriptorJson)
- {
- if (deviceDescriptorJson == null)
- {
- throw new ArgumentNullException("deviceDescriptorJson");
- }
-
- //create a device descriptor object for storing the parsed json in an object
- DeviceDescriptor deviceDescriptor;
- JsonTextReader reader;
-
-
- reader = new JsonTextReader(new StringReader(deviceDescriptorJson));
- if (reader != null)
- {
- deviceDescriptor = new DeviceDescriptor();
- }
- else
- {
- Debug.LogError("No Device Descriptor detected.");
- return null;
- }
-
- //parsey
- while (reader.Read())
- {
- if (reader.Value != null && reader.ValueType == typeof(String))
- {
- string parsedJson = reader.Value.ToString().ToLower();
- switch (parsedJson)
- {
- case "vendor":
- deviceDescriptor.Vendor = reader.ReadAsString();
- break;
- case "model":
- deviceDescriptor.Model = reader.ReadAsString();
- break;
- case "version":
- deviceDescriptor.Version = reader.ReadAsString();
- break;
- case "num_displays":
- deviceDescriptor.NumDisplays = int.Parse(reader.ReadAsString());
- break;
- case "note":
- deviceDescriptor.Note = reader.ReadAsString();
- break;
- case "monocular_horizontal":
- deviceDescriptor.MonocularHorizontal = float.Parse(reader.ReadAsString());
- break;
- case "monocular_vertical":
- deviceDescriptor.MonocularVertical = float.Parse(reader.ReadAsString());
- break;
- case "overlap_percent":
- deviceDescriptor.OverlapPercent = float.Parse(reader.ReadAsString());
- break;
- case "pitch_tilt":
- deviceDescriptor.PitchTilt = float.Parse(reader.ReadAsString());
- break;
- case "width":
- deviceDescriptor.Width = int.Parse(reader.ReadAsString());
- break;
- case "height":
- deviceDescriptor.Height = int.Parse(reader.ReadAsString());
- break;
- case "video_inputs":
- deviceDescriptor.VideoInputs = int.Parse(reader.ReadAsString());
- break;
- case "display_mode":
- deviceDescriptor.DisplayMode = reader.ReadAsString();
- break;
- case "swapeyes":
- deviceDescriptor.SwapEyes = int.Parse(reader.ReadAsString());
- break;
- case "k1_red":
- deviceDescriptor.K1Red = float.Parse(reader.ReadAsString());
- break;
- case "k1_green":
- deviceDescriptor.K1Green = float.Parse(reader.ReadAsString());
- break;
- case "k1_blue":
- deviceDescriptor.K1Blue = float.Parse(reader.ReadAsString());
- break;
- case "right_roll":
- deviceDescriptor.RightRoll = float.Parse(reader.ReadAsString());
- break;
- case "left_roll":
- deviceDescriptor.LeftRoll = float.Parse(reader.ReadAsString());
- break;
- case "center_proj_x":
- deviceDescriptor.CenterProjX = float.Parse(reader.ReadAsString());
- break;
- case "center_proj_y":
- deviceDescriptor.CenterProjY = float.Parse(reader.ReadAsString());
- break;
- case "rotate_180":
- deviceDescriptor.Rotate180 = int.Parse(reader.ReadAsString());
- break;
- }
- }
- }
-
- return deviceDescriptor;
- }
-}
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/DisplayController.cs b/OSVR-Unity/Assets/OSVRUnity/src/DisplayController.cs
new file mode 100644
index 0000000..d814e95
--- /dev/null
+++ b/OSVR-Unity/Assets/OSVRUnity/src/DisplayController.cs
@@ -0,0 +1,253 @@
+/// OSVR-Unity Connection
+///
+/// http://sensics.com/osvr
+///
+///
+/// Copyright 2015 Sensics, Inc.
+///
+/// Licensed under the Apache License, Version 2.0 (the "License");
+/// you may not use this file except in compliance with the License.
+/// You may obtain a copy of the License at
+///
+/// http://www.apache.org/licenses/LICENSE-2.0
+///
+/// Unless required by applicable law or agreed to in writing, software
+/// distributed under the License is distributed on an "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+/// See the License for the specific language governing permissions and
+/// limitations under the License.
+///
+///
+/// Author: Greg Aring
+/// Email: greg@sensics.com
+///
+using UnityEngine;
+using System.Collections;
+
+namespace OSVR
+{
+ namespace Unity
+ {
+ //*This class is responsible for creating stereo rendering in a scene, and updating viewing parameters
+ // throughout a scene's lifecycle.
+ // The number of viewers, eyes, and surfaces, as well as viewports, projection matrices,and distortion
+ // paramerters are obtained from OSVR via ClientKit.
+ //
+ // DisplayController creates VRViewers and VREyes as children. Although VRViewers and VREyes are siblings
+ // in the scene hierarchy, conceptually VREyes are indeed children of VRViewers. The reason they are siblings
+ // in the Unity scene is because GetViewerEyePose(...) returns a pose relative to world space, not head space.
+ //
+ // In this implementation, we are assuming that there is exactly one viewer and one surface per eye.
+ //*/
+ [RequireComponent(typeof(Camera))] //requires a "dummy" camera
+ public class DisplayController : MonoBehaviour
+ {
+
+ public const uint NUM_VIEWERS = 1;
+ private const int TARGET_FRAME_RATE = 60; //@todo get from OSVR
+
+ private ClientKit _clientKit;
+ private OSVR.ClientKit.DisplayConfig _displayConfig;
+ private VRViewer[] _viewers;
+ private uint _viewerCount;
+ private bool _renderedStereo = false;
+ private bool _displayConfigInitialized = false;
+ private bool _checkDisplayStartup = false;
+ private Camera _camera;
+ private bool _disabledCamera = true;
+
+ public Camera Camera
+ {
+ get
+ {
+ if (_camera == null)
+ {
+ _camera = GetComponent();
+ }
+ return _camera;
+ }
+ set { _camera = value; }
+ }
+ public OSVR.ClientKit.DisplayConfig DisplayConfig
+ {
+ get { return _displayConfig; }
+ set { _displayConfig = value; }
+ }
+ public VRViewer[] Viewers { get { return _viewers; } }
+ public uint ViewerCount { get { return _viewerCount; } }
+
+ void Awake()
+ {
+ _clientKit = FindObjectOfType();
+ if(_clientKit == null)
+ {
+ Debug.LogError("DisplayController requires a ClientKit object in the scene.");
+ }
+ _camera = GetComponent(); //get the "dummy" camera
+ SetupApplicationSettings();
+ }
+ void Start()
+ {
+ //attempt to setup the display here, but it might take a few frames before we have data
+ SetupDisplay();
+ }
+
+ void OnEnable()
+ {
+ StartCoroutine("EndOfFrame");
+ }
+
+ void OnDisable()
+ {
+ StopCoroutine("EndOfFrame");
+ }
+
+ void SetupApplicationSettings()
+ {
+ //VR should never timeout the screen:
+ Screen.sleepTimeout = SleepTimeout.NeverSleep;
+
+ //Set the framerate
+ //@todo get this value from OSVR, not a const value
+ //Performance note: Developers should try setting Time.fixedTimestep to 1/Application.targetFrameRate
+ Application.targetFrameRate = TARGET_FRAME_RATE;
+ }
+
+ //Get a DisplayConfig object from the server via ClientKit.
+ //Setup stereo rendering with DisplayConfig data.
+ void SetupDisplay()
+ {
+ //get the DisplayConfig object from ClientKit
+ if(_clientKit.context == null)
+ {
+ Debug.LogError("ClientContext is null. Can't setup display.");
+ return;
+ }
+ _displayConfig = _clientKit.context.GetDisplayConfig();
+ if (_displayConfig == null)
+ {
+ return;
+ }
+ _displayConfigInitialized = true;
+
+ //get the number of viewers, bail if there isn't exactly one viewer for now
+ _viewerCount = _displayConfig.GetNumViewers();
+ if(_viewerCount != 1)
+ {
+ Debug.LogError(_viewerCount + " viewers found, but this implementation requires exactly one viewer.");
+ return;
+ }
+ //create scene objects
+ CreateHeadAndEyes();
+ }
+
+
+ //Creates a head and eyes as configured in clientKit
+ //Viewers and Eyes are siblings, children of DisplayController
+ //Each eye has one child Surface which has a camera
+ private void CreateHeadAndEyes()
+ {
+ /* ASSUME ONE VIEWER */
+ //Create VRViewers, only one in this implementation
+ _viewerCount = (uint)_displayConfig.GetNumViewers();
+ if(_viewerCount != NUM_VIEWERS)
+ {
+ Debug.LogError(_viewerCount + " viewers detected. This implementation supports exactly one viewer.");
+ return;
+ }
+ _viewers = new VRViewer[_viewerCount];
+ //loop through viewers because at some point we could support multiple viewers
+ //but this implementation currently supports exactly one
+ for (uint viewerIndex = 0; viewerIndex < _viewerCount; viewerIndex++)
+ {
+ //create a VRViewer
+ GameObject vrViewer = new GameObject("VRViewer" + viewerIndex);
+ vrViewer.AddComponent(); //add an audio listener
+ VRViewer vrViewerComponent = vrViewer.AddComponent();
+ vrViewerComponent.DisplayController = this; //pass DisplayController to Viewers
+ vrViewerComponent.ViewerIndex = viewerIndex; //set the viewer's index
+ vrViewer.transform.parent = this.transform; //child of DisplayController
+ vrViewer.transform.localPosition = Vector3.zero;
+ _viewers[viewerIndex] = vrViewerComponent;
+
+ //create Viewer's VREyes
+ uint eyeCount = (uint)_displayConfig.GetNumEyesForViewer(viewerIndex); //get the number of eyes for this viewer
+ vrViewerComponent.CreateEyes(eyeCount);
+ }
+ }
+
+ void Update()
+ {
+ //sometimes it takes a few frames to get a DisplayConfig from ClientKit
+ //keep trying until we have initialized
+ if(!_displayConfigInitialized)
+ {
+ SetupDisplay();
+ }
+ }
+
+ //helper method for updating the client context
+ public void UpdateClient()
+ {
+ _clientKit.context.update();
+ }
+
+ //Culling determines which objects are visible to the camera. OnPreCull is called just before this process.
+ //This gets called because we have a camera component, but we disable the camera here so it doesn't render.
+ //We have the "dummy" camera so existing Unity game code can refer to a MainCamera object.
+ //We update our viewer and eye transforms here because it is as late as possible before rendering happens.
+ //OnPreRender is not called because we disable the camera here.
+ void OnPreCull()
+ {
+ // Disable dummy camera during rendering
+ // Enable after frame ends
+ _camera.enabled = false;
+
+ //for each viewer, update each eye, which will update each surface
+ for (uint viewerIndex = 0; viewerIndex < _viewerCount; viewerIndex++)
+ {
+ VRViewer viewer = Viewers[viewerIndex];
+
+ //update the client
+ UpdateClient();
+
+ //update poses once DisplayConfig is ready
+ if (_checkDisplayStartup)
+ {
+ //update the viewer's head pose
+ viewer.UpdateViewerHeadPose(DisplayConfig.GetViewerPose(viewerIndex));
+
+ //each viewer update its eyes
+ viewer.UpdateEyes();
+ }
+ else
+ {
+ _checkDisplayStartup = DisplayConfig.CheckDisplayStartup();
+ }
+ }
+
+ // Flag that we disabled the camera
+ _disabledCamera = true;
+ }
+
+ //This couroutine is called every frame.
+ IEnumerator EndOfFrame()
+ {
+ while (true)
+ {
+ //if we disabled the dummy camera, enable it here
+ if (_disabledCamera)
+ {
+ Camera.enabled = true;
+ _disabledCamera = false;
+ }
+ yield return new WaitForEndOfFrame();
+ //@todo any post-frame activity goes here.
+ //Send a timestamp?
+ //GL.IssuePluginEvent?
+ }
+ }
+ }
+ }
+}
+
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/DeviceDescriptor.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/DisplayController.cs.meta
similarity index 78%
rename from OSVR-Unity/Assets/OSVRUnity/src/DeviceDescriptor.cs.meta
rename to OSVR-Unity/Assets/OSVRUnity/src/DisplayController.cs.meta
index 6eae0cb..d457b86 100644
--- a/OSVR-Unity/Assets/OSVRUnity/src/DeviceDescriptor.cs.meta
+++ b/OSVR-Unity/Assets/OSVRUnity/src/DisplayController.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 0d7c2e8cb37f36640aa5267bb01f5916
+guid: c2b982789045b4641a4c4898908314b3
MonoImporter:
serializedVersion: 2
defaultReferences: []
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/DisplayInterface.cs b/OSVR-Unity/Assets/OSVRUnity/src/DisplayInterface.cs
deleted file mode 100644
index e6987c5..0000000
--- a/OSVR-Unity/Assets/OSVRUnity/src/DisplayInterface.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-/// OSVR-Unity Connection
-///
-/// http://sensics.com/osvr
-///
-///
-/// Copyright 2014 Sensics, Inc.
-///
-/// Licensed under the Apache License, Version 2.0 (the "License");
-/// you may not use this file except in compliance with the License.
-/// You may obtain a copy of the License at
-///
-/// http://www.apache.org/licenses/LICENSE-2.0
-///
-/// Unless required by applicable law or agreed to in writing, software
-/// distributed under the License is distributed on an "AS IS" BASIS,
-/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-/// See the License for the specific language governing permissions and
-/// limitations under the License.
-///
-
-using System;
-using UnityEngine;
-using Newtonsoft.Json;
-using System.IO;
-using System.Collections;
-
-namespace OSVR
-{
- namespace Unity
- {
- ///
- /// Display interface: provides information about the device display that is needed to set correct values in Unity scene.
- ///
- /// Currently parses a JSON descriptor file provided by developer in the Unity scene.
- /// If a file is not provided, it reads from /display, which will eventually be the default way that this class works.
- ///
- public class DisplayInterface : MonoBehaviour
- {
- private string _deviceDescriptorJson; //a string that is the JSON file to be parsed
-
- //_initalized exists to make sure the display config has been parsed before trying to read it
- public bool Initialized
- {
- get { return _initialized; }
- }
- private bool _initialized = false; //flag set when _deviceDescriptorJson has data from /display
-
- void Start()
- {
- ReadDisplayPath();
- }
-
- //this function attempts to retrieve display configuration from the /display path
- //this data is in JSON format. Once it has initialized, the data is used to configure Camera and other settings.
- public void ReadDisplayPath()
- {
- if (!_initialized)
- {
- _deviceDescriptorJson = ClientKit.instance.context.getStringParameter("/display");
- if (_deviceDescriptorJson != "")
- {
- _initialized = true;
- }
- }
- }
-
- ///
- /// This function will parse the Json display parameters from /display using Newstonsoft
- ///
- /// Returns a DeviceDescriptor object containing stored json values.
- ///
- public DeviceDescriptor GetDeviceDescription()
- {
- return _deviceDescriptorJson == null ? null : DeviceDescriptor.Parse(_deviceDescriptorJson);
- }
- }
- }
-}
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/K1RadialDistortion.cs b/OSVR-Unity/Assets/OSVRUnity/src/K1RadialDistortion.cs
index e1f4f07..d8873ac 100644
--- a/OSVR-Unity/Assets/OSVRUnity/src/K1RadialDistortion.cs
+++ b/OSVR-Unity/Assets/OSVRUnity/src/K1RadialDistortion.cs
@@ -69,11 +69,11 @@ public K1RadialDistortionFactory()
///
/// Creates a K1RadialDistortion effect and adds it as a component to the given eye, if possible.
///
- /// VREye to apply the effect to.
+ /// VRSurface to apply the effect to.
/// K1RadialDistortion object for parameter setting, or null if not supported
- public K1RadialDistortion GetOrCreateDistortion(OSVR.Unity.VREye eye)
+ public K1RadialDistortion GetOrCreateDistortion(OSVR.Unity.VRSurface surface)
{
- K1RadialDistortion ret = eye.DistortionEffect;
+ K1RadialDistortion ret = surface.DistortionEffect;
if (!Supported)
{
if (ret)
@@ -86,8 +86,8 @@ public K1RadialDistortion GetOrCreateDistortion(OSVR.Unity.VREye eye)
}
if (ret == null)
{
- ret = eye.gameObject.AddComponent();
- eye.DistortionEffect = ret;
+ ret = surface.gameObject.AddComponent();
+ surface.DistortionEffect = ret;
ret.hideFlags = HideFlags.HideAndDontSave;
ret.DistortionMaterial = new Material(DistortionShader);
if (!ret.DistortionMaterial)
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/Math.cs b/OSVR-Unity/Assets/OSVRUnity/src/Math.cs
index 0c5a655..4b1752b 100644
--- a/OSVR-Unity/Assets/OSVRUnity/src/Math.cs
+++ b/OSVR-Unity/Assets/OSVRUnity/src/Math.cs
@@ -50,6 +50,37 @@ public static Matrix4x4 ConvertPose(OSVR.ClientKit.Pose3 pose)
{
return Matrix4x4.TRS(Math.ConvertPosition(pose.translation), Math.ConvertOrientation(pose.rotation), Vector3.zero);
}
+
+ //Convert OSVR.ClientKit.Viewport to Rect
+ public static Rect ConvertViewport(OSVR.ClientKit.Viewport viewport)
+ {
+ //Unity expects normalized coordinates, not pixel coordinates
+ //@todo below assumes left and right eyes split the screen in half horizontally
+ return new Rect(viewport.Left / (2f*viewport.Width), viewport.Bottom / viewport.Height, viewport.Width/(viewport.Width*2f), 1);
+ }
+
+ //Convert OSVR.ClientKit.Matrix44f to Matrix4x4
+ public static Matrix4x4 ConvertMatrix(OSVR.ClientKit.Matrix44f matrix)
+ {
+ Matrix4x4 matrix4x4 = new Matrix4x4();
+ matrix4x4[0, 0] = matrix.M0;
+ matrix4x4[1, 0] = matrix.M1;
+ matrix4x4[2, 0] = matrix.M2;
+ matrix4x4[3, 0] = matrix.M3;
+ matrix4x4[0, 1] = matrix.M4;
+ matrix4x4[1, 1] = matrix.M5;
+ matrix4x4[2, 1] = matrix.M6;
+ matrix4x4[3, 1] = matrix.M7;
+ matrix4x4[0, 2] = matrix.M8;
+ matrix4x4[1, 2] = matrix.M9;
+ matrix4x4[2, 2] = matrix.M10;
+ matrix4x4[3, 2] = matrix.M11;
+ matrix4x4[0, 3] = matrix.M12;
+ matrix4x4[1, 3] = matrix.M13;
+ matrix4x4[2, 3] = matrix.M14;
+ matrix4x4[3, 3] = matrix.M15;
+ return matrix4x4;
+ }
}
}
}
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/VREye.cs b/OSVR-Unity/Assets/OSVRUnity/src/VREye.cs
index eb24a33..555609d 100644
--- a/OSVR-Unity/Assets/OSVRUnity/src/VREye.cs
+++ b/OSVR-Unity/Assets/OSVRUnity/src/VREye.cs
@@ -30,39 +30,32 @@ namespace OSVR
{
namespace Unity
{
-
- public enum Eye { left, right };
-
public class VREye : MonoBehaviour
{
- #region Private Variables
- private Camera _camera;
- private ClientKit clientKit;
- private K1RadialDistortion _distortionEffect;
+ public const int NUM_SURFACES = 1;
+
+ #region Private Variables
+ private VRViewer _viewer; //the viewer associated with this eye
+ private VRSurface[] _surfaces; //the surfaces associated with this eye
+ private uint _surfaceCount;
+ private uint _eyeIndex;
+
#endregion
- #region Public Variables
- public Eye eye;
- public Camera Camera { get { return _camera; } set { _camera = value; } }
- [HideInInspector]
- public Transform cachedTransform;
- [HideInInspector]
- public VRHead head;
- [HideInInspector]
- public K1RadialDistortion DistortionEffect
+ #region Public Variables
+ public uint EyeIndex
{
- get
- {
- if (!_distortionEffect)
- {
- _distortionEffect = GetComponent();
- }
- return _distortionEffect;
- }
- set
- {
- _distortionEffect = value;
- }
+ get { return _eyeIndex; }
+ set { _eyeIndex = value; }
+ }
+ public VRSurface[] Surfaces { get { return _surfaces; } }
+ public uint SurfaceCount { get { return _surfaceCount; } }
+ public VRViewer Viewer
+ {
+ get { return _viewer; }
+ set { _viewer = value; }
}
+ [HideInInspector]
+ public Transform cachedTransform;
#endregion
#region Init
@@ -73,83 +66,102 @@ void Awake()
#endregion
#region Public Methods
- public void MatchCamera(Camera sourceCamera)
- {
- Camera.CopyFrom(sourceCamera);
- SetViewportRects();
-
- }
-
- //rotate each eye outward
- public void SetEyeRotationY(float y)
- {
- cachedTransform.Rotate(0, y, 0, Space.Self);
- }
- //set the z rotation of the eye
- public void SetEyeRoll(float rollAmount)
- {
- cachedTransform.Rotate(0, 0, rollAmount, Space.Self);
- }
#endregion
#region Private Methods
void Init()
{
- if(clientKit == null)
- {
- clientKit = GameObject.FindObjectOfType();
- }
- if (head == null)
- {
- gameObject.GetComponentInParent();
- }
//cache:
cachedTransform = transform;
+ }
+ #endregion
- if (Camera == null)
- {
- if ((Camera = GetComponent()) == null)
- {
- Camera = gameObject.AddComponent();
- }
- }
-
- SetViewportRects();
+ // Updates the position and rotation of the eye
+ // Optionally, update the viewer associated with this eye
+ public void UpdateEyePose(OSVR.ClientKit.Pose3 eyePose)
+ {
+ cachedTransform.localPosition = Math.ConvertPosition(eyePose.translation);
+ cachedTransform.localRotation = Math.ConvertOrientation(eyePose.rotation);
}
- //helper method to set correct viewport for each eye
- private void SetViewportRects()
+ //For each Surface, update viewing parameters and render the surface
+ public void UpdateSurfaces()
{
- if (Camera == null)
+ //for each surface
+ for (uint surfaceIndex = 0; surfaceIndex < SurfaceCount; surfaceIndex++)
{
- Init();
- }
- //camera setups:
- switch (eye)
- {
- case Eye.left:
- Camera.rect = new Rect(0, 0, .5f, 1);
- break;
- case Eye.right:
- Camera.rect = new Rect(.5f, 0, .5f, 1);
- break;
+ //get the eye's surface
+ VRSurface surface = Surfaces[surfaceIndex];
+
+ //get viewport from ClientKit and set surface viewport
+ OSVR.ClientKit.Viewport viewport = Viewer.DisplayController.DisplayConfig.GetRelativeViewportForViewerEyeSurface(
+ Viewer.ViewerIndex, (byte)_eyeIndex, surfaceIndex);
+
+ surface.SetViewport(Math.ConvertViewport(viewport));
+
+ //get projection matrix from ClientKit and set surface projection matrix
+ OSVR.ClientKit.Matrix44f projMatrix = Viewer.DisplayController.DisplayConfig.GetProjectionMatrixForViewerEyeSurfacef(
+ Viewer.ViewerIndex, (byte)_eyeIndex, surfaceIndex,
+ surface.Camera.nearClipPlane, surface.Camera.farClipPlane, OSVR.ClientKit.MatrixConventionsFlags.ColMajor);
+
+ surface.SetProjectionMatrix(Math.ConvertMatrix(projMatrix));
+
+ //render the surface
+ surface.Render();
}
}
- //Called before a camera renders the scene.
- //the goal here is to update the client often to make sure we have the most recent tracker data
- //this helps reduce latency
- void OnPreRender()
+ //Create this Eye's VRSurfaces.
+ //Each VRSurface has a camera component which controls rendering for the VREye
+ public void CreateSurfaces(uint surfaceCount)
{
- clientKit.context.update();
- if (head)
+ _surfaceCount = surfaceCount;
+ _surfaces = new VRSurface[_surfaceCount];
+ if (surfaceCount != NUM_SURFACES)
{
- head.UpdatePose();
+ Debug.LogError("Eye" + _eyeIndex + " has " + surfaceCount + " surfaces, but " +
+ "this implementation requires exactly one surface per eye.");
+ return;
+ }
+ //loop through surfaces because at some point we could support eyes with multiple surfaces
+ //but this implementation currently supports exactly one
+ for (uint surfaceIndex = 0; surfaceIndex < surfaceCount; surfaceIndex++)
+ {
+ GameObject surfaceGameObject = new GameObject("Surface");
+ VRSurface surface = surfaceGameObject.AddComponent();
+ surface.Eye = this;
+ surface.Camera = surfaceGameObject.GetComponent(); //VRSurface has camera component by default
+ CopyCamera(Viewer.DisplayController.Camera, surface.Camera); //copy camera properties from the "dummy" camera to surface camera
+ surface.Camera.enabled = false; //disabled so we can control rendering manually
+ surfaceGameObject.transform.parent = this.transform; //surface is child of Eye
+ surfaceGameObject.transform.localPosition = Vector3.zero;
+ Surfaces[surfaceIndex] = surface;
+
+ //distortion
+ bool useDistortion = Viewer.DisplayController.DisplayConfig.DoesViewerEyeSurfaceWantDistortion(Viewer.ViewerIndex, (byte)_eyeIndex, surfaceIndex);
+ if(useDistortion)
+ {
+ //@todo figure out which type of distortion to use
+ //right now, there is only one option, SurfaceRadialDistortion
+ //get distortion parameters
+ OSVR.ClientKit.RadialDistortionParameters distortionParameters =
+ Viewer.DisplayController.DisplayConfig.GetViewerEyeSurfaceRadialDistortion(
+ Viewer.ViewerIndex, (byte)_eyeIndex, surfaceIndex);
+
+ surface.SetDistortion(distortionParameters);
+ }
}
}
- #endregion
+ //helper method that copies camera properties from one camera to another
+ //copies from srcCamera to destCamera
+ private void CopyCamera(Camera srcCamera, Camera destCamera)
+ {
+ //Copy the camera properties.
+ destCamera.CopyFrom(srcCamera);
+ //@todo Copy other components attached to the DisplayController?
+ }
}
}
}
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/VRHead.cs b/OSVR-Unity/Assets/OSVRUnity/src/VRHead.cs
deleted file mode 100644
index 510c908..0000000
--- a/OSVR-Unity/Assets/OSVRUnity/src/VRHead.cs
+++ /dev/null
@@ -1,352 +0,0 @@
-/// OSVR-Unity Connection
-///
-/// http://sensics.com/osvr
-///
-///
-/// Copyright 2014 Sensics, Inc.
-///
-/// Licensed under the Apache License, Version 2.0 (the "License");
-/// you may not use this file except in compliance with the License.
-/// You may obtain a copy of the License at
-///
-/// http://www.apache.org/licenses/LICENSE-2.0
-///
-/// Unless required by applicable law or agreed to in writing, software
-/// distributed under the License is distributed on an "AS IS" BASIS,
-/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-/// See the License for the specific language governing permissions and
-/// limitations under the License.
-///
-///
-/// Author: Bob Berkebile
-/// Email: bob@bullyentertainment.com || bobb@pixelplacement.com
-///
-
-using UnityEngine;
-using System.Collections;
-
-namespace OSVR
-{
- namespace Unity
- {
-
- public enum ViewMode { stereo, mono };
-
- [RequireComponent(typeof(Camera))]
- [RequireComponent(typeof(DisplayInterface))]
- public class VRHead : MonoBehaviour
- {
- #region Public Variables
- public ViewMode viewMode;
-
- [Range(0, 1)]
- public float stereoAmount;
- public float maxStereo = .03f;
- public Camera Camera { get { return _camera; } set { _camera = value; } }
- #endregion
-
- #region Private Variables
- private VREye _leftEye;
- private VREye _rightEye;
- private bool swapEyes = false;
- private float _previousStereoAmount;
- private ViewMode _previousViewMode;
- private Camera _camera;
- private DeviceDescriptor _deviceDescriptor;
- private DisplayInterface _displayInterface;
- private bool _initDisplayInterface = false;
- private PoseInterface _poseIf;
- #endregion
-
- #region Init
- void Start()
- {
- Init();
- CatalogEyes();
-/*
- if (_distortionEffect != null)
- {
- _distortionEffect.enabled = (viewMode == ViewMode.mono);
- }
-*/
- _displayInterface = GetComponent();
- _poseIf = GetComponent();
-
- //update VRHead with info from the display interface if it has been initialized
- //it might not be initialized if it is still parsing a display json file
- //in that case, we will try to initialize asap in the update function
- if (_displayInterface != null && _displayInterface.Initialized)
- {
- UpdateDisplayInterface();
- }
- //else initialize in Update()
- }
- #endregion
-
- #region Loop
- void Update()
- {
-
- if (!_initDisplayInterface && !_displayInterface.Initialized)
- {
- //if the display configuration hasn't initialized, ping the DisplayInterface to retrieve it from the ClientKit
- //this would mean DisplayInterface was unable to retrieve that data in its Start() function.
- _displayInterface.ReadDisplayPath();
- }
- else if (!_initDisplayInterface && _displayInterface.Initialized)
- {
- //once the DisplayInterface has initialized, meaning it has read data from the /display path which contains
- //display configuration, update the Camera and other settings with properties from the display configuration.
- UpdateDisplayInterface();
- }
- else if (_initDisplayInterface)
- {
- UpdateStereoAmount();
- UpdateViewMode();
- }
- }
- public void UpdatePose()
- {
- var state = _poseIf.Interface.GetState();
- transform.localPosition = state.Value.Position;
- transform.localRotation = state.Value.Rotation;
- }
- #endregion
-
- #region Public Methods
- #endregion
-
- #region Private Methods
- private void UpdateDisplayInterface()
- {
- GetDeviceDescription();
- MatchEyes(); //copy camera properties to each eye
- //rotate each eye based on overlap percent, must do this after match eyes
- if (_deviceDescriptor != null)
- {
- SetEyeRotation(_deviceDescriptor.OverlapPercent, _deviceDescriptor.MonocularHorizontal);
- SetEyeRoll(_deviceDescriptor.LeftRoll, _deviceDescriptor.RightRoll);
- }
- _initDisplayInterface = true;
- }
- void UpdateViewMode()
- {
- if (Time.realtimeSinceStartup < 100 || _previousViewMode != viewMode)
- {
- switch (viewMode)
- {
- case ViewMode.mono:
- Camera.enabled = true;
- _leftEye.Camera.enabled = false;
- _rightEye.Camera.enabled = false;
- break;
-
- case ViewMode.stereo:
- Camera.enabled = false;
- _leftEye.Camera.enabled = true;
- _rightEye.Camera.enabled = true;
-
- break;
- }
- }
-
- _previousViewMode = viewMode;
- }
-
- void UpdateStereoAmount()
- {
- if (stereoAmount != _previousStereoAmount)
- {
- stereoAmount = Mathf.Clamp(stereoAmount, 0, 1);
- _rightEye.cachedTransform.localPosition = (swapEyes ? Vector3.left : Vector3.right) * (maxStereo * stereoAmount);
- _leftEye.cachedTransform.localPosition = (swapEyes ? Vector3.right : Vector3.left) * (maxStereo * stereoAmount);
- _previousStereoAmount = stereoAmount;
- }
- }
-
- //this function finds and initializes each eye
- void CatalogEyes()
- {
- foreach (VREye currentEye in GetComponentsInChildren())
- {
- //catalog:
- switch (currentEye.eye)
- {
- case Eye.left:
- // Only need one eye to update the head.
- currentEye.head = this;
- _leftEye = currentEye;
- break;
-
- case Eye.right:
- _rightEye = currentEye;
- break;
- }
- }
- }
-
- //this function matches the camera on each eye to the camera on the head
- void MatchEyes()
- {
- foreach (VREye currentEye in GetComponentsInChildren())
- {
- //match:
- currentEye.MatchCamera(Camera);
- }
- }
-
- void Init()
- {
- if (Camera == null)
- {
- if ((Camera = GetComponent()) == null)
- {
- Camera = gameObject.AddComponent();
- }
- }
-
- //VR should never timeout the screen:
- Screen.sleepTimeout = SleepTimeout.NeverSleep;
-
- //60 FPS whenever possible:
- Application.targetFrameRate = 60;
-
- _initDisplayInterface = false;
- }
-
- ///
- /// GetDeviceDescription: Get a Description of the HMD and apply appropriate settings
- ///
- ///
- private void GetDeviceDescription()
- {
- _deviceDescriptor = _displayInterface.GetDeviceDescription();
- if (_deviceDescriptor != null)
- {
- switch (_deviceDescriptor.DisplayMode)
- {
- case "full_screen":
- viewMode = ViewMode.mono;
- break;
- case "horz_side_by_side":
- case "vert_side_by_side":
- default:
- viewMode = ViewMode.stereo;
- break;
- }
- swapEyes = _deviceDescriptor.SwapEyes > 0; //swap left and right eye positions?
- stereoAmount = Mathf.Clamp(_deviceDescriptor.OverlapPercent, 0, 100);
- SetResolution(_deviceDescriptor.Width, _deviceDescriptor.Height); //set resolution before FOV
- Camera.fieldOfView = Mathf.Clamp(_deviceDescriptor.MonocularVertical, 0, 180); //unity camera FOV is vertical
- float aspectRatio = (float)_deviceDescriptor.Width / (float)_deviceDescriptor.Height;
- //aspect ratio per eye depends on how many displays the HMD has
- //for example, dSight has two 1920x1080 displays, so each eye should have 1.77 aspect
- //whereas HDK has one 1920x1080 display, each eye should have 0.88 aspect (half of 1.77)
- float aspectRatioPerEye = _deviceDescriptor.NumDisplays == 1 ? aspectRatio * 0.5f : aspectRatio;
- //set projection matrix for each eye
- Camera.projectionMatrix = Matrix4x4.Perspective(_deviceDescriptor.MonocularVertical, aspectRatioPerEye, Camera.nearClipPlane, Camera.farClipPlane);
- SetDistortion(_deviceDescriptor.K1Red, _deviceDescriptor.K1Green, _deviceDescriptor.K1Blue,
- _deviceDescriptor.CenterProjX, _deviceDescriptor.CenterProjY); //set distortion shader
-
- //if the view needs to be rotated 180 degrees, create a parent game object that is flipped 180 degrees on the z axis.
- if (_deviceDescriptor.Rotate180 > 0)
- {
- GameObject vrHeadParent = new GameObject();
- vrHeadParent.name = this.transform.name + "_parent";
- vrHeadParent.transform.position = this.transform.position;
- vrHeadParent.transform.rotation = this.transform.rotation;
- if (this.transform.parent != null)
- {
- vrHeadParent.transform.parent = this.transform.parent;
- }
- this.transform.parent = vrHeadParent.transform;
- vrHeadParent.transform.Rotate(0, 0, 180, Space.Self);
- }
- }
- }
-
- private void SetDistortion(float k1Red, float k1Green, float k1Blue, float centerProjX, float centerProjY)
- {
- SetDistortion(_leftEye, k1Red, k1Green, k1Blue, new Vector2(centerProjX, centerProjY));
- SetDistortion(_rightEye, k1Red, k1Green, k1Blue, new Vector2(centerProjX, centerProjY));
- }
- private void SetDistortion(VREye eye, float k1Red, float k1Green, float k1Blue, Vector2 center)
- {
- // disable distortion if there is no distortion for this HMD
- if (k1Red == 0 && k1Green == 0 && k1Blue == 0)
- {
- if (eye.DistortionEffect)
- {
- eye.DistortionEffect.enabled = false;
- }
- return;
- }
- // Otherwise try to create distortion and set its parameters
- var distortionFactory = new K1RadialDistortionFactory();
- var effect = distortionFactory.GetOrCreateDistortion(eye);
- if (effect)
- {
- effect.k1Red = k1Red;
- effect.k1Green = k1Green;
- effect.k1Blue = k1Blue;
- effect.center = center;
- }
- }
-
- //Set the Screen Resolution
- private void SetResolution(int width, int height)
- {
- //set the resolution, default to full screen
- Screen.SetResolution(width, height, true);
-#if UNITY_EDITOR
- UnityEditor.PlayerSettings.defaultScreenWidth = width;
- UnityEditor.PlayerSettings.defaultScreenHeight = height;
- UnityEditor.PlayerSettings.defaultIsFullScreen = true;
-#endif
- }
-
- //rotate each eye based on overlap percent and horizontal FOV
- //Formula: ((OverlapPercent/100) * hFOV)/2
- private void SetEyeRotation(float overlapPercent, float horizontalFov)
- {
- float overlap = overlapPercent* .01f * horizontalFov * 0.5f;
-
- //with a 90 degree FOV with 100% overlap, the eyes should not be rotated
- //compare rotationY with half of FOV
-
- float halfFOV = horizontalFov * 0.5f;
- float rotateYAmount = Mathf.Abs(overlap - halfFOV);
-
- foreach (VREye currentEye in GetComponentsInChildren())
- {
- switch (currentEye.eye)
- {
- case Eye.left:
- _leftEye.SetEyeRotationY(-rotateYAmount);
- break;
- case Eye.right:
- _rightEye.SetEyeRotationY(rotateYAmount);
- break;
- }
- }
- }
- //rotate each eye on the z axis by the specified amount, in degrees
- private void SetEyeRoll(float leftRoll, float rightRoll)
- {
- foreach (VREye currentEye in GetComponentsInChildren())
- {
- switch (currentEye.eye)
- {
- case Eye.left:
- _leftEye.SetEyeRoll(leftRoll);
- break;
- case Eye.right:
- _rightEye.SetEyeRoll(rightRoll);
- break;
- }
- }
- }
- #endregion
- }
- }
-}
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/VRSurface.cs b/OSVR-Unity/Assets/OSVRUnity/src/VRSurface.cs
new file mode 100644
index 0000000..2c219f8
--- /dev/null
+++ b/OSVR-Unity/Assets/OSVRUnity/src/VRSurface.cs
@@ -0,0 +1,125 @@
+/// OSVR-Unity Connection
+///
+/// http://sensics.com/osvr
+///
+///
+/// Copyright 2015 Sensics, Inc.
+///
+/// Licensed under the Apache License, Version 2.0 (the "License");
+/// you may not use this file except in compliance with the License.
+/// You may obtain a copy of the License at
+///
+/// http://www.apache.org/licenses/LICENSE-2.0
+///
+/// Unless required by applicable law or agreed to in writing, software
+/// distributed under the License is distributed on an "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+/// See the License for the specific language governing permissions and
+/// limitations under the License.
+///
+///
+/// Author: Greg Aring
+/// Email: greg@sensics.com
+///
+///
+using UnityEngine;
+using System.Collections;
+namespace OSVR
+{
+ namespace Unity
+ {
+ //This class is responsible for rendering for a VREye.
+ [RequireComponent(typeof(Camera))]
+ public class VRSurface : MonoBehaviour
+ {
+ private Camera _camera;
+ private K1RadialDistortion _distortionEffect;
+ private uint _surfaceIndex; //index in the eye's VRSurface array
+ private VREye _eye; //the eye that this surface controls rendering for
+
+ public Camera Camera { get { return _camera; } set { _camera = value; } }
+ public uint SurfaceIndex { get { return _surfaceIndex; } set { _surfaceIndex = value; } }
+ public VREye Eye { get { return _eye; } set { _eye = value; } }
+
+ [HideInInspector]
+ public K1RadialDistortion DistortionEffect
+ {
+ get
+ {
+ if (!_distortionEffect)
+ {
+ _distortionEffect = GetComponent();
+ }
+ return _distortionEffect;
+ }
+ set
+ {
+ _distortionEffect = value;
+ }
+ }
+
+ //Set the camera's viewport rect
+ public void SetViewport(Rect rect)
+ {
+ _camera.rect = rect;
+ }
+
+ //Set the camera's view matrix
+ public void SetViewMatrix(Matrix4x4 viewMatrix)
+ {
+ _camera.worldToCameraMatrix = viewMatrix;
+ }
+
+ //Set the camera's projection matrix
+ public void SetProjectionMatrix(Matrix4x4 projMatrix)
+ {
+ _camera.projectionMatrix = projMatrix;
+ }
+
+ //Given distortion parameters, setup the appropriate distortion method
+ //@todo this should be more generalized when we have more distortion options
+ public void SetDistortion(OSVR.ClientKit.RadialDistortionParameters distortionParameters)
+ {
+ float k1Red = (float)distortionParameters.k1.x;
+ float k1Green = (float)distortionParameters.k1.y;
+ float k1Blue = (float)distortionParameters.k1.z;
+ Vector2 center = new Vector2((float)distortionParameters.centerOfProjection.x,
+ (float)distortionParameters.centerOfProjection.y);
+
+ //@todo figure out which type of distortion to use
+ //right now, there is only one option
+ SetK1RadialDistortion(k1Red, k1Green, k1Blue, center);
+ }
+
+ //set distortion parameters for K1 Radial Distortion method
+ private void SetK1RadialDistortion(float k1Red, float k1Green, float k1Blue, Vector2 center)
+ {
+ // disable distortion if there is no distortion for this HMD
+ if (k1Red == 0 && k1Green == 0 && k1Blue == 0)
+ {
+ if (DistortionEffect)
+ {
+ DistortionEffect.enabled = false;
+ }
+ return;
+ }
+ // Otherwise try to create distortion and set its parameters
+ var distortionFactory = new K1RadialDistortionFactory();
+ var effect = distortionFactory.GetOrCreateDistortion(this);
+ if (effect)
+ {
+ effect.k1Red = k1Red;
+ effect.k1Green = k1Green;
+ effect.k1Blue = k1Blue;
+ effect.center = center;
+ }
+ }
+
+ //Render the camera
+ public void Render()
+ {
+ _camera.Render();
+ }
+ }
+ }
+}
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/DisplayInterface.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/VRSurface.cs.meta
similarity index 78%
rename from OSVR-Unity/Assets/OSVRUnity/src/DisplayInterface.cs.meta
rename to OSVR-Unity/Assets/OSVRUnity/src/VRSurface.cs.meta
index 911dd19..cf434d0 100644
--- a/OSVR-Unity/Assets/OSVRUnity/src/DisplayInterface.cs.meta
+++ b/OSVR-Unity/Assets/OSVRUnity/src/VRSurface.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: a288e4aec9950634b83d232abc73d1bb
+guid: b7fba0cec21c9f24eb6e97ebd6e2b7a9
MonoImporter:
serializedVersion: 2
defaultReferences: []
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/VRViewer.cs b/OSVR-Unity/Assets/OSVRUnity/src/VRViewer.cs
new file mode 100644
index 0000000..7789b06
--- /dev/null
+++ b/OSVR-Unity/Assets/OSVRUnity/src/VRViewer.cs
@@ -0,0 +1,106 @@
+/// OSVR-Unity Connection
+///
+/// http://sensics.com/osvr
+///
+///
+/// Copyright 2014 Sensics, Inc.
+///
+/// Licensed under the Apache License, Version 2.0 (the "License");
+/// you may not use this file except in compliance with the License.
+/// You may obtain a copy of the License at
+///
+/// http://www.apache.org/licenses/LICENSE-2.0
+///
+/// Unless required by applicable law or agreed to in writing, software
+/// distributed under the License is distributed on an "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+/// See the License for the specific language governing permissions and
+/// limitations under the License.
+///
+///
+/// Author: Bob Berkebile
+/// Email: bob@bullyentertainment.com || bobb@pixelplacement.com
+///
+
+using UnityEngine;
+using System.Collections;
+
+namespace OSVR
+{
+ namespace Unity
+ {
+ public class VRViewer : MonoBehaviour
+ {
+ #region Public Variables
+ public DisplayController DisplayController { get { return _displayController; } set { _displayController = value; } }
+ public VREye[] Eyes { get { return _eyes; } }
+ public uint EyeCount { get { return _eyeCount; } }
+ public uint ViewerIndex { get { return _viewerIndex; } set { _viewerIndex = value; } }
+ [HideInInspector]
+ public Transform cachedTransform;
+ #endregion
+
+ #region Private Variables
+ private DisplayController _displayController;
+ private VREye[] _eyes;
+ private uint _eyeCount;
+ private uint _viewerIndex;
+
+ #endregion
+
+ void Awake()
+ {
+ Init();
+ }
+
+ void Init()
+ {
+ //cache:
+ cachedTransform = transform;
+ }
+
+ //Creates the Eyes of this Viewer
+ public void CreateEyes(uint eyeCount)
+ {
+ _eyeCount = eyeCount; //cache the number of eyes this viewer controls
+ _eyes = new VREye[_eyeCount];
+ for (uint eyeIndex = 0; eyeIndex < _eyeCount; eyeIndex++)
+ {
+ GameObject eyeGameObject = new GameObject("Eye" + eyeIndex); //add an eye gameobject to the scene
+ VREye eye = eyeGameObject.AddComponent(); //add the VReye component
+ eye.Viewer = this; //ASSUME THERE IS ONLY ONE VIEWER
+ eye.EyeIndex = eyeIndex; //set the eye's index
+ eyeGameObject.transform.parent = _displayController.transform; //child of DisplayController
+ eyeGameObject.transform.localPosition = Vector3.zero;
+ _eyes[eyeIndex] = eye;
+ uint eyeSurfaceCount = DisplayController.DisplayConfig.GetNumSurfacesForViewerEye(ViewerIndex, (byte)eyeIndex);
+ eye.CreateSurfaces(eyeSurfaceCount);
+ }
+ }
+
+ //Updates the position and rotation of the head
+ public void UpdateViewerHeadPose(OSVR.ClientKit.Pose3 headPose)
+ {
+ cachedTransform.localPosition = Math.ConvertPosition(headPose.translation);
+ cachedTransform.localRotation = Math.ConvertOrientation(headPose.rotation);
+ }
+
+ //Update the pose of each eye, then update and render each eye's surfaces
+ public void UpdateEyes()
+ {
+ for (uint eyeIndex = 0; eyeIndex < EyeCount; eyeIndex++)
+ {
+ //update the client
+ DisplayController.UpdateClient();
+
+ //update the eye pose
+ VREye eye = Eyes[eyeIndex];
+ eye.UpdateEyePose(_displayController.DisplayConfig.GetViewerEyePose(ViewerIndex, (byte)eyeIndex));
+
+ //update the eye's surfaces, includes a call to Render the surface
+ eye.UpdateSurfaces();
+ }
+ }
+ }
+ }
+}
diff --git a/OSVR-Unity/Assets/OSVRUnity/src/VRHead.cs.meta b/OSVR-Unity/Assets/OSVRUnity/src/VRViewer.cs.meta
similarity index 100%
rename from OSVR-Unity/Assets/OSVRUnity/src/VRHead.cs.meta
rename to OSVR-Unity/Assets/OSVRUnity/src/VRViewer.cs.meta
diff --git a/OSVR-Unity/Assets/Plugins/Newtonsoft.Json.dll b/OSVR-Unity/Assets/Plugins/Newtonsoft.Json.dll
deleted file mode 100644
index 475e312..0000000
Binary files a/OSVR-Unity/Assets/Plugins/Newtonsoft.Json.dll and /dev/null differ
diff --git a/OSVR-Unity/Assets/Plugins/Newtonsoft.Json.dll.meta b/OSVR-Unity/Assets/Plugins/Newtonsoft.Json.dll.meta
deleted file mode 100644
index 2907c66..0000000
--- a/OSVR-Unity/Assets/Plugins/Newtonsoft.Json.dll.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 771e8b89c38781044b6f7bee6facb982
-MonoAssemblyImporter:
- serializedVersion: 1
- iconMap: {}
- executionOrder: {}
- userData: