From e7e2b6408e1fdbf6b9b69aab7d95b1bec4d39755 Mon Sep 17 00:00:00 2001 From: Jesse CreateThis Date: Tue, 25 Apr 2017 14:45:27 -0400 Subject: [PATCH] Rotate OriginTransform if trigger held down. #43 --- .../SteamVR/InteractionSystem/Core/Icons.meta | 9 - .../Core/Shaders/SeeThru.shader | 6 +- .../Core/Shaders/Silhouette.shader | 6 +- .../Shaders/ControllerButtonHints.shader | 8 +- .../Teleport/Shaders/Highlight.shader | 6 +- .../SteamVR/Resources/SteamVR_AlphaOut.shader | 6 +- .../SteamVR/Resources/SteamVR_ClearAll.shader | 6 +- .../SteamVR/Resources/SteamVR_ColorOut.shader | 6 +- .../SteamVR_SphericalProjection.shader | 6 +- .../Art/Materials/Selectable Border.mat | 108 +++-------- .../Prefabs/Directional Selection Pad.prefab | 114 ++++++++++++ .../Directional Selection Pad.prefab.meta | 9 + .../Art/directional_selectionpad.fbx | Bin 0 -> 20460 bytes .../Art/directional_selectionpad.fbx.meta | 82 +++++++++ .../Example Scenes/testbed_vive.unity | 69 +++++-- .../Scripts/ParabolicPointer.cs | 25 ++- .../Vive-Teleporter/Scripts/TeleportVive.cs | 80 ++++---- .../Vive-Teleporter/Shader/FadeBlack.shader | 6 +- .../Shader/TransparentNoOverlap.shader | 6 +- .../Shader/ViveMovementBorder.shader | 6 +- .../Shader/ViveMovementGrid.shader | 6 +- ProjectSettings/ProjectSettings.asset | 173 ++++++++++++++++-- ProjectSettings/ProjectVersion.txt | 2 +- 23 files changed, 564 insertions(+), 181 deletions(-) delete mode 100644 Assets/SteamVR/InteractionSystem/Core/Icons.meta create mode 100644 Assets/Vive-Teleporter/Art/Prefabs/Directional Selection Pad.prefab create mode 100644 Assets/Vive-Teleporter/Art/Prefabs/Directional Selection Pad.prefab.meta create mode 100644 Assets/Vive-Teleporter/Art/directional_selectionpad.fbx create mode 100644 Assets/Vive-Teleporter/Art/directional_selectionpad.fbx.meta diff --git a/Assets/SteamVR/InteractionSystem/Core/Icons.meta b/Assets/SteamVR/InteractionSystem/Core/Icons.meta deleted file mode 100644 index 5c73e6b..0000000 --- a/Assets/SteamVR/InteractionSystem/Core/Icons.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 1fcf8377413b60c44afff7b2e4efd8f7 -folderAsset: yes -timeCreated: 1482867667 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/SteamVR/InteractionSystem/Core/Shaders/SeeThru.shader b/Assets/SteamVR/InteractionSystem/Core/Shaders/SeeThru.shader index 438f534..6e36950 100644 --- a/Assets/SteamVR/InteractionSystem/Core/Shaders/SeeThru.shader +++ b/Assets/SteamVR/InteractionSystem/Core/Shaders/SeeThru.shader @@ -1,4 +1,6 @@ -//======= Copyright (c) Valve Corporation, All rights reserved. =============== +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +//======= Copyright (c) Valve Corporation, All rights reserved. =============== // // Purpose: Used for objects that can be seen through objects in fron of them // @@ -66,7 +68,7 @@ Shader "Valve/VR/SeeThru" #if UNITY_VERSION >= 540 o.vertex = UnityObjectToClipPos(i.vertex); #else - o.vertex = mul(UNITY_MATRIX_MVP, i.vertex); + o.vertex = UnityObjectToClipPos(i.vertex); #endif o.uv = TRANSFORM_TEX( i.uv, _MainTex ); diff --git a/Assets/SteamVR/InteractionSystem/Core/Shaders/Silhouette.shader b/Assets/SteamVR/InteractionSystem/Core/Shaders/Silhouette.shader index 77e3084..4f9827d 100644 --- a/Assets/SteamVR/InteractionSystem/Core/Shaders/Silhouette.shader +++ b/Assets/SteamVR/InteractionSystem/Core/Shaders/Silhouette.shader @@ -1,3 +1,5 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + //======= Copyright (c) Valve Corporation, All rights reserved. =============== // // Purpose: Used to show the outline of the object @@ -50,7 +52,7 @@ Shader "Valve/VR/Silhouette" #if UNITY_VERSION >= 540 o.vPositionPs = UnityObjectToClipPos( i.vPositionOs.xyzw ); #else - o.vPositionPs = mul( UNITY_MATRIX_MVP, i.vPositionOs.xyzw ); + o.vPositionPs = UnityObjectToClipPos( i.vPositionOs.xyzw ); #endif return o; } @@ -69,7 +71,7 @@ Shader "Valve/VR/Silhouette" #if UNITY_VERSION >= 540 extruded.vPositionPs = UnityObjectToClipPos( vertex.vPositionOs.xyzw ); #else - extruded.vPositionPs = mul( UNITY_MATRIX_MVP, vertex.vPositionOs.xyzw ); + extruded.vPositionPs = UnityObjectToClipPos( vertex.vPositionOs.xyzw ); #endif extruded.vPositionPs.xy += vOffsetPs.xy * extruded.vPositionPs.w * g_flOutlineWidth; diff --git a/Assets/SteamVR/InteractionSystem/Hints/Shaders/ControllerButtonHints.shader b/Assets/SteamVR/InteractionSystem/Hints/Shaders/ControllerButtonHints.shader index c48e175..51dc898 100644 --- a/Assets/SteamVR/InteractionSystem/Hints/Shaders/ControllerButtonHints.shader +++ b/Assets/SteamVR/InteractionSystem/Hints/Shaders/ControllerButtonHints.shader @@ -1,4 +1,6 @@ -//======= Copyright (c) Valve Corporation, All rights reserved. =============== +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +//======= Copyright (c) Valve Corporation, All rights reserved. =============== // // Purpose: // @@ -60,7 +62,7 @@ Shader "Valve/VR/ControllerButtonHints" #if UNITY_VERSION >= 540 o.vertex = UnityObjectToClipPos(i.vertex); #else - o.vertex = mul(UNITY_MATRIX_MVP, i.vertex); + o.vertex = UnityObjectToClipPos(i.vertex); #endif return o; } @@ -114,7 +116,7 @@ Shader "Valve/VR/ControllerButtonHints" #if UNITY_VERSION >= 540 o.vertex = UnityObjectToClipPos(i.vertex); #else - o.vertex = mul(UNITY_MATRIX_MVP, i.vertex); + o.vertex = UnityObjectToClipPos(i.vertex); #endif o.uv = TRANSFORM_TEX( i.uv, _MainTex ); diff --git a/Assets/SteamVR/InteractionSystem/Teleport/Shaders/Highlight.shader b/Assets/SteamVR/InteractionSystem/Teleport/Shaders/Highlight.shader index 16b060d..6ae6ffd 100644 --- a/Assets/SteamVR/InteractionSystem/Teleport/Shaders/Highlight.shader +++ b/Assets/SteamVR/InteractionSystem/Teleport/Shaders/Highlight.shader @@ -1,4 +1,6 @@ -//======= Copyright (c) Valve Corporation, All rights reserved. =============== +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +//======= Copyright (c) Valve Corporation, All rights reserved. =============== // // Purpose: Used for the teleport markers // @@ -54,7 +56,7 @@ Shader "Valve/VR/Highlight" #if UNITY_VERSION >= 540 o.vertex = UnityObjectToClipPos(i.vertex); #else - o.vertex = mul(UNITY_MATRIX_MVP, i.vertex); + o.vertex = UnityObjectToClipPos(i.vertex); #endif o.uv = TRANSFORM_TEX( i.uv, _MainTex ); o.color = i.color; diff --git a/Assets/SteamVR/Resources/SteamVR_AlphaOut.shader b/Assets/SteamVR/Resources/SteamVR_AlphaOut.shader index 3d3f74a..88c60bb 100644 --- a/Assets/SteamVR/Resources/SteamVR_AlphaOut.shader +++ b/Assets/SteamVR/Resources/SteamVR_AlphaOut.shader @@ -1,4 +1,6 @@ -Shader "Custom/SteamVR_AlphaOut" { +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Custom/SteamVR_AlphaOut" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} } CGINCLUDE @@ -17,7 +19,7 @@ #if UNITY_VERSION >= 540 o.pos = UnityObjectToClipPos(v.vertex); #else - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); #endif o.tex = v.texcoord; return o; diff --git a/Assets/SteamVR/Resources/SteamVR_ClearAll.shader b/Assets/SteamVR/Resources/SteamVR_ClearAll.shader index cf0192d..95804ee 100644 --- a/Assets/SteamVR/Resources/SteamVR_ClearAll.shader +++ b/Assets/SteamVR/Resources/SteamVR_ClearAll.shader @@ -1,4 +1,6 @@ -Shader "Custom/SteamVR_ClearAll" { +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Custom/SteamVR_ClearAll" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} } CGINCLUDE @@ -17,7 +19,7 @@ #if UNITY_VERSION >= 540 o.pos = UnityObjectToClipPos(v.vertex); #else - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); #endif o.tex = v.texcoord; return o; diff --git a/Assets/SteamVR/Resources/SteamVR_ColorOut.shader b/Assets/SteamVR/Resources/SteamVR_ColorOut.shader index 5fdc48f..d771978 100644 --- a/Assets/SteamVR/Resources/SteamVR_ColorOut.shader +++ b/Assets/SteamVR/Resources/SteamVR_ColorOut.shader @@ -1,4 +1,6 @@ -Shader "Custom/SteamVR_ColorOut" { +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Custom/SteamVR_ColorOut" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} } CGINCLUDE @@ -17,7 +19,7 @@ #if UNITY_VERSION >= 540 o.pos = UnityObjectToClipPos(v.vertex); #else - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); #endif o.tex = v.texcoord; return o; diff --git a/Assets/SteamVR/Resources/SteamVR_SphericalProjection.shader b/Assets/SteamVR/Resources/SteamVR_SphericalProjection.shader index f53fa34..d0eba30 100644 --- a/Assets/SteamVR/Resources/SteamVR_SphericalProjection.shader +++ b/Assets/SteamVR/Resources/SteamVR_SphericalProjection.shader @@ -1,4 +1,6 @@ -Shader "Custom/SteamVR_SphericalProjection" { +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Custom/SteamVR_SphericalProjection" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} _N ("N (normal of plane)", Vector) = (0,0,0,0) @@ -35,7 +37,7 @@ #if UNITY_VERSION >= 540 o.pos = UnityObjectToClipPos(v.vertex); #else - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); #endif o.tex = float2( lerp(_Phi0, _Phi1, v.texcoord.x), diff --git a/Assets/Vive-Teleporter/Art/Materials/Selectable Border.mat b/Assets/Vive-Teleporter/Art/Materials/Selectable Border.mat index 13b668e..139b048 100644 --- a/Assets/Vive-Teleporter/Art/Materials/Selectable Border.mat +++ b/Assets/Vive-Teleporter/Art/Materials/Selectable Border.mat @@ -10,115 +10,65 @@ Material: m_Shader: {fileID: 4800000, guid: 18f009343c2ca574a83a6413c38bae08, type: 3} m_ShaderKeywords: m_LightmapFlags: 5 + m_EnableInstancingVariants: 0 m_CustomRenderQueue: 2900 stringTagMap: {} + disabledShaderPasses: [] m_SavedProperties: - serializedVersion: 2 + serializedVersion: 3 m_TexEnvs: - - first: - name: _BumpMap - second: + - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _DetailAlbedoMap - second: + - _DetailAlbedoMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _DetailMask - second: + - _DetailMask: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _DetailNormalMap - second: + - _DetailNormalMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _EmissionMap - second: + - _EmissionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _MainTex - second: + - _MainTex: m_Texture: {fileID: 2800000, guid: 8d229bee78a4c3e4a8ef189d4ce1ded1, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _MetallicGlossMap - second: + - _MetallicGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _OcclusionMap - second: + - _OcclusionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _ParallaxMap - second: + - _ParallaxMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - - first: - name: _Alpha - second: 1 - - first: - name: _BumpScale - second: 1 - - first: - name: _Cutoff - second: 0.5 - - first: - name: _DetailNormalMapScale - second: 1 - - first: - name: _DstBlend - second: 0 - - first: - name: _Glossiness - second: 0.5 - - first: - name: _Metallic - second: 0 - - first: - name: _Mode - second: 0 - - first: - name: _OcclusionStrength - second: 1 - - first: - name: _Parallax - second: 0.02 - - first: - name: _SrcBlend - second: 1 - - first: - name: _TexScale - second: 1 - - first: - name: _UVSec - second: 0 - - first: - name: _ZWrite - second: 1 + - _Alpha: 1 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Glossiness: 0.5 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SrcBlend: 1 + - _TexScale: 1 + - _UVSec: 0 + - _ZWrite: 1 m_Colors: - - first: - name: _BackColor - second: {r: 0.7681661, g: 0.90513265, b: 0.9411765, a: 0.172} - - first: - name: _Color - second: {r: 0.5363322, g: 0.8340889, b: 0.9117647, a: 0.791} - - first: - name: _EmissionColor - second: {r: 0, g: 0, b: 0, a: 1} + - _BackColor: {r: 0.7681661, g: 0.90513265, b: 0.9411765, a: 0.172} + - _Color: {r: 0.5363322, g: 0.8340889, b: 0.9117647, a: 0.791} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Vive-Teleporter/Art/Prefabs/Directional Selection Pad.prefab b/Assets/Vive-Teleporter/Art/Prefabs/Directional Selection Pad.prefab new file mode 100644 index 0000000..4661307 --- /dev/null +++ b/Assets/Vive-Teleporter/Art/Prefabs/Directional Selection Pad.prefab @@ -0,0 +1,114 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !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: 1450775690525346} + m_IsPrefabParent: 1 +--- !u!1 &1450775690525346 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4367960383009162} + m_Layer: 0 + m_Name: Directional Selection Pad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1884748280574298 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4299323630715750} + - component: {fileID: 33654308451575410} + - component: {fileID: 23139105615768582} + m_Layer: 0 + m_Name: mesh + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4299323630715750 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1884748280574298} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.1} + m_Children: [] + m_Father: {fileID: 4367960383009162} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!4 &4367960383009162 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1450775690525346} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.992} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4299323630715750} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23139105615768582 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1884748280574298} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 23066602789434f6d92ddf4583872361, type: 2} + - {fileID: 2100000, guid: a1074950d2ab7f249b008a5fd9003ec8, type: 2} + - {fileID: 2100000, guid: b6b5773f01b2447c28329e3c8304cb84, type: 2} + - {fileID: 2100000, guid: 9ef80c34fe6584f8284052714ee984ca, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33654308451575410 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1884748280574298} + m_Mesh: {fileID: 4300000, guid: fcdc19d255bbdff4ba7c571d5cb2f8b7, type: 3} diff --git a/Assets/Vive-Teleporter/Art/Prefabs/Directional Selection Pad.prefab.meta b/Assets/Vive-Teleporter/Art/Prefabs/Directional Selection Pad.prefab.meta new file mode 100644 index 0000000..e91a5db --- /dev/null +++ b/Assets/Vive-Teleporter/Art/Prefabs/Directional Selection Pad.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 10ef670a24781844eba60cb54060d261 +timeCreated: 1493061990 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Vive-Teleporter/Art/directional_selectionpad.fbx b/Assets/Vive-Teleporter/Art/directional_selectionpad.fbx new file mode 100644 index 0000000000000000000000000000000000000000..d34545530684975b0856f109d8b4b1eec04018ce GIT binary patch literal 20460 zcmc&+3tWuZ`=5|pa<}fKEMk$8l~TGY(M_Xd7nx?>YM5p+7d4{RC9TUM)@@zd-(p)E z%gQdcXx+Arh}>_@)4_{#Z-zX^|%M4sASdZdr8FdFpm~c)d?U}D9v4YN{=2;X~wE- zFXuf};xD75t~@#KbD#t^IPKtSfm6U`x7v|b zoM^SM1@OfX1gsu=o8B@vWV zE~I4E79toZj@||?Jzs8H_;8i*6^P<56>*VlB3CXIibJ_560Cy{4&8Bhhy=thH4h1n z`jf!eK^wrd$1YNSW00Nz5^8XN1_@`&M=A^j`xVhs2SbdID8vGW4QS;!Lw6j4CtUFC zUhtu!nC}!3ArkUw3kv|9139xt1U)$nPG`7NX{8&&(dy_A5vGvK{7fD;#>0pAd)*f!$>fhMS(6ptX!o%Pij_=;Il5SROPnPA@JxPO~*= z8&0z~gW9bIs%lyrInRKlOIZpmpkqZ9Yl-vkA@IXxV^GQ$g@5+XI+6bG{x5b9seGAA z`r*h8YpixCHPo_U7MAeO#FFS5Xq-heFna{If~yHD$2Vvmq_k(&3N9s=gENzjB2Pdm zsy#pY9vO?KhNoN#6xe$(T%ffuuN?mfrzoL}c8o&sx-e3XhgeR9Qj9zIz#$wbWWyM; zHq~UpP_cH>3PL)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*&(+B_kZjov~?W&@MV@VZEVHjdp@17R2@jqPn5i#@#bWo z3VnY1%xB$KzVFxfP2tk+N$mYISUG;Zs$16QBgP{LIxXmPHPpzGGPRKMXkrTwWIX- zf|)aC_HoQIJQ!_a+2z8Ag{K?~Axuwke2=_sYr#Us!vOT9{O>XfYd`5K%XI) zupz~eExBgUfIyglVSdzz!(#VfmTF_t4-o#NnZ2+# z7Y-q{#|}DiDOEy$?QX zer?gZ2V+%9m~T`!oH6h?L?y{ljO;$@d}gX6fnwb(1WZ(##-FAEG3O9Lfz&9D7ddO- z%^y_i8YK@PR3_7=`jCRw;0jh-Yr1VRZ#MH2>rODoNCtaljsZCuanTz|YB4T0a8bZ7 zm*H2fxPp>A;t z0;iA$e4=5E^BU|*pUh;lXloC*2XLb*HPmXf1ET=g4r0b7T6L15J*($ZC@kidewzhh7L=gi^k! z_If@Otg&7zUrZXbSa~9gwzic&VTIu}th|-`r?v9&fQL%b*!6rP;fH0GOW`IBegR4RTf8?=o zee3xx!qk6Z<#)a6ThG_dQFH_LS?jrnSX^g4pD;m#rH7LSEtbBFMO)j_bATsRsbT4_ zfCxp)QZ&{2t9?1q5QvVLSVz%RcseX6@IO-lJ@WI3Ed4@VxTaY8=boS3(q#maH32Hi z)II?qBv!zVra{-F0A5opy@=2^!qP24$?(xlu=K?M@o6pnG-2w$uyk7Fsy`LpsyleG z!bJkcO~2J58v^yX=woI{&xP9zK74%C`5urqQ~c`frh0uu-CtR6H&sGF-R;MEyQ%gR z>TVhJc2fl;>TX5#c2jvYbvM;e=ua!3>aY5k6_E{u8g&%oqLAW?fONW|x?}CT^0egE s7yi8*^84J1#eK>K#?)@d|LgAmtGxYc<*eM-H)5VWHGH60J-F@v0bH>8IsgCw literal 0 HcmV?d00001 diff --git a/Assets/Vive-Teleporter/Art/directional_selectionpad.fbx.meta b/Assets/Vive-Teleporter/Art/directional_selectionpad.fbx.meta new file mode 100644 index 0000000..d8e32b5 --- /dev/null +++ b/Assets/Vive-Teleporter/Art/directional_selectionpad.fbx.meta @@ -0,0 +1,82 @@ +fileFormatVersion: 2 +guid: fcdc19d255bbdff4ba7c571d5cb2f8b7 +timeCreated: 1493061395 +licenseType: Free +ModelImporter: + serializedVersion: 19 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: directional_selectionpad + materials: + importMaterials: 0 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 100 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + keepQuads: 0 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + serializedVersion: 2 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + rootMotionBoneName: + rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 0 + humanoidOversampling: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Vive-Teleporter/Example Scenes/testbed_vive.unity b/Assets/Vive-Teleporter/Example Scenes/testbed_vive.unity index b3b2057..3e795ad 100644 --- a/Assets/Vive-Teleporter/Example Scenes/testbed_vive.unity +++ b/Assets/Vive-Teleporter/Example Scenes/testbed_vive.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 7 + serializedVersion: 8 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -25,6 +25,7 @@ RenderSettings: m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 @@ -37,11 +38,11 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.18028352, g: 0.22571376, b: 0.30692244, a: 1} + m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1} --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 7 + serializedVersion: 9 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 @@ -53,7 +54,7 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 4 + serializedVersion: 8 m_Resolution: 2 m_BakeResolution: 40 m_TextureWidth: 1024 @@ -66,13 +67,27 @@ LightmapSettings: m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 - m_DirectLightInLightProbes: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 1024 m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFiltering: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousColorSigma: 1 + m_PVRFilteringAtrousNormalSigma: 1 + m_PVRFilteringAtrousPositionSigma: 1 m_LightingDataAsset: {fileID: 0} - m_RuntimeCPUUsage: 25 + m_ShadowMaskMode: 2 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -89,6 +104,8 @@ NavMeshSettings: minRegionArea: 2 manualCellSize: 0 cellSize: 0.033333335 + manualTileSize: 0 + tileSize: 256 accuratePlacement: 1 m_NavMeshData: {fileID: 23800000, guid: ce7521d87a0ca724fa3e59ab56792096, type: 2} --- !u!1 &49310332 @@ -152,6 +169,7 @@ MeshRenderer: m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 + m_SortingLayer: 0 m_SortingOrder: 0 --- !u!65 &49310335 BoxCollider: @@ -223,7 +241,7 @@ Light: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 194302927} m_Enabled: 1 - serializedVersion: 7 + serializedVersion: 8 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 @@ -248,6 +266,8 @@ Light: m_Lightmapping: 4 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &194302929 @@ -311,6 +331,7 @@ MeshRenderer: m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 + m_SortingLayer: 0 m_SortingOrder: 0 --- !u!65 &252273284 BoxCollider: @@ -405,6 +426,7 @@ MeshRenderer: m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 + m_SortingLayer: 0 m_SortingOrder: 0 --- !u!65 &403550046 BoxCollider: @@ -685,6 +707,7 @@ MeshRenderer: m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 + m_SortingLayer: 0 m_SortingOrder: 0 --- !u!65 &747962032 BoxCollider: @@ -765,6 +788,7 @@ GameObject: - component: {fileID: 1012858798} - component: {fileID: 1012858803} - component: {fileID: 1012858801} + - component: {fileID: 1012858799} m_Layer: 0 m_Name: Camera (eye) m_TagString: MainCamera @@ -806,6 +830,20 @@ MonoBehaviour: Controllers: - {fileID: 1426292698} - {fileID: 1478648218} +--- !u!114 &1012858799 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012858796} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6bca9ccf900ccc84c887d783321d27e2, type: 3} + m_Name: + m_EditorClassIdentifier: + _head: {fileID: 154042613} + _ears: {fileID: 144652751} + wireframe: 0 --- !u!124 &1012858800 Behaviour: m_ObjectHideFlags: 0 @@ -822,12 +860,9 @@ MonoBehaviour: m_GameObject: {fileID: 1012858796} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6bca9ccf900ccc84c887d783321d27e2, type: 3} + m_Script: {fileID: 11500000, guid: b61cd59d8f02e454186a61a5f55c21b9, type: 3} m_Name: m_EditorClassIdentifier: - _head: {fileID: 154042613} - _ears: {fileID: 144652751} - wireframe: 0 --- !u!20 &1012858802 Camera: m_ObjectHideFlags: 0 @@ -859,6 +894,8 @@ Camera: m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 @@ -949,6 +986,8 @@ Camera: m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 m_OcclusionCulling: 0 m_StereoConvergence: 10 m_StereoSeparation: 0.022 @@ -1014,6 +1053,7 @@ MeshRenderer: m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 + m_SortingLayer: 0 m_SortingOrder: 0 --- !u!65 &1090383490 BoxCollider: @@ -1082,6 +1122,7 @@ MeshRenderer: m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 + m_SortingLayer: 0 m_SortingOrder: 0 --- !u!65 &1117295731 BoxCollider: @@ -1158,6 +1199,11 @@ Prefab: propertyPath: NavMesh value: objectReference: {fileID: 2064051119} + - target: {fileID: 11446438, guid: 9e047e2aefaa8dc47b373572e8c58866, type: 2} + propertyPath: SelectionPadPrefab + value: + objectReference: {fileID: 1450775690525346, guid: 10ef670a24781844eba60cb54060d261, + type: 2} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 9e047e2aefaa8dc47b373572e8c58866, type: 2} m_IsPrefabParent: 0 @@ -1275,6 +1321,7 @@ MeshRenderer: m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 + m_SortingLayer: 0 m_SortingOrder: 0 --- !u!65 &1580289069 BoxCollider: diff --git a/Assets/Vive-Teleporter/Scripts/ParabolicPointer.cs b/Assets/Vive-Teleporter/Scripts/ParabolicPointer.cs index 5410adc..468fd2b 100644 --- a/Assets/Vive-Teleporter/Scripts/ParabolicPointer.cs +++ b/Assets/Vive-Teleporter/Scripts/ParabolicPointer.cs @@ -19,6 +19,10 @@ public class ParabolicPointer : MonoBehaviour { public float GraphicThickness = 0.2f; [Tooltip("Material to use to render the parabola mesh")] public Material GraphicMaterial; + public bool shouldRotate; + public Transform OriginTransform; + public Vector3 normal; + public Vector3 forward; [Header("Selection Pad Properties")] [SerializeField] [Tooltip("Prefab to use as the selection pad when the player is pointing at a valid teleportable surface.")] @@ -210,8 +214,9 @@ void Update() CurrentParabolaAngleY = ClampInitialVelocity(ref velocity, out velocity_normalized); CurrentPointVector = velocity_normalized; - Vector3 normal; - PointOnNavMesh = CalculateParabolicCurve( + if (!shouldRotate) + { + PointOnNavMesh = CalculateParabolicCurve( transform.position, velocity, Acceleration, PointSpacing, PointCount, @@ -219,7 +224,8 @@ void Update() ParabolaPoints, out normal); - SelectedPoint = ParabolaPoints[ParabolaPoints.Count-1]; + SelectedPoint = ParabolaPoints[ParabolaPoints.Count - 1]; + } // 2. Render Parabola graphics if(SelectionPadObject != null) @@ -228,7 +234,18 @@ void Update() SelectionPadObject.transform.position = SelectedPoint + Vector3.one * 0.005f; if(PointOnNavMesh) { - SelectionPadObject.transform.rotation = Quaternion.LookRotation(normal); + if (shouldRotate) + { + forward = velocity * -1; + } + + if (forward != Vector3.zero) + { + SelectionPadObject.transform.rotation = Quaternion.LookRotation(normal, forward); + } else + { + SelectionPadObject.transform.rotation = Quaternion.LookRotation(normal, OriginTransform.forward); + } SelectionPadObject.transform.Rotate(90, 0, 0); } } diff --git a/Assets/Vive-Teleporter/Scripts/TeleportVive.cs b/Assets/Vive-Teleporter/Scripts/TeleportVive.cs index 95ddb09..5dc7958 100644 --- a/Assets/Vive-Teleporter/Scripts/TeleportVive.cs +++ b/Assets/Vive-Teleporter/Scripts/TeleportVive.cs @@ -55,6 +55,7 @@ public class TeleportVive : MonoBehaviour { private float TeleportTimeMarker = -1; private Mesh PlaneMesh; + private bool hasRotated = false; void Start() { @@ -89,16 +90,16 @@ void Start() Vector3 p0, p1, p2, p3; if (GetChaperoneBounds(out p0, out p1, out p2, out p3)) - { - // Rotate to match camera rig rotation - var originRotationMatrix = Matrix4x4.TRS(Vector3.zero, OriginTransform.rotation, Vector3.one); - - BorderPointSet p = new BorderPointSet(new Vector3[] { - originRotationMatrix * p0, - originRotationMatrix * p1, - originRotationMatrix * p2, - originRotationMatrix * p3, - originRotationMatrix * p0, + { + // Rotate to match camera rig rotation + var originRotationMatrix = Matrix4x4.TRS(Vector3.zero, OriginTransform.rotation, Vector3.one); + + BorderPointSet p = new BorderPointSet(new Vector3[] { + originRotationMatrix * p0, + originRotationMatrix * p1, + originRotationMatrix * p2, + originRotationMatrix * p3, + originRotationMatrix * p0, }); RoomBorder.Points = new BorderPointSet[] { @@ -174,7 +175,14 @@ void Update () // We have finished fading out - time to teleport! Vector3 offset = OriginTransform.position - HeadTransform.position; offset.y = 0; + OriginTransform.position = Pointer.SelectedPoint + offset; + + if (Pointer.forward != Vector3.zero) + { + OriginTransform.rotation = Quaternion.LookRotation(Pointer.normal, Pointer.forward * -1); + OriginTransform.Rotate(90, 0, 0); + } } TeleportTimeMarker = Time.time; @@ -191,8 +199,10 @@ void Update () int index = (int)ActiveController.index; var device = SteamVR_Controller.Input(index); bool shouldTeleport = device.GetPressUp(SteamVR_Controller.ButtonMask.Touchpad); + bool shouldRotate = device.GetPress(SteamVR_Controller.ButtonMask.Trigger); + if (shouldRotate) hasRotated = true; bool shouldCancel = device.GetPressUp(SteamVR_Controller.ButtonMask.Grip); - if (shouldTeleport || shouldCancel) + if ((shouldTeleport || shouldCancel || hasRotated) && !shouldRotate) { // If the user has decided to teleport (ie lets go of touchpad) then remove all visual indicators // related to selecting things and actually teleport @@ -202,9 +212,11 @@ void Update () // Begin teleport sequence CurrentTeleportState = TeleportState.Teleporting; TeleportTimeMarker = Time.time; - } - else + } else + { CurrentTeleportState = TeleportState.None; + hasRotated = false; + } // Reset active controller, disable pointer, disable visual indicators ActiveController = null; @@ -220,6 +232,8 @@ void Update () Pointer.transform.localScale = Vector3.one; } else { + Pointer.OriginTransform = OriginTransform; + Pointer.shouldRotate = shouldRotate; // The user is still deciding where to teleport and has the touchpad held down. // Note: rendering of the parabolic pointer / marker is done in ParabolicPointer Vector3 offset = HeadTransform.position - OriginTransform.position; @@ -233,25 +247,25 @@ void Update () if (Pointer.CurrentParabolaAngleY >= 45) // Don't click when at max degrees LastClickAngle = Pointer.CurrentPointVector; - float angleClickDiff = Vector3.Angle(LastClickAngle, Pointer.CurrentPointVector); + float angleClickDiff = Vector3.Angle(LastClickAngle, Pointer.CurrentPointVector); if (IsClicking && Mathf.Abs(angleClickDiff) > HapticClickAngleStep) { LastClickAngle = Pointer.CurrentPointVector; if (Pointer.PointOnNavMesh) device.TriggerHapticPulse(); - } - - // Trigger a stronger haptic pulse when "entering" a teleportable surface - if (Pointer.PointOnNavMesh && !IsClicking) - { - IsClicking = true; - device.TriggerHapticPulse(750); - LastClickAngle = Pointer.CurrentPointVector; - } + } + + // Trigger a stronger haptic pulse when "entering" a teleportable surface + if (Pointer.PointOnNavMesh && !IsClicking) + { + IsClicking = true; + device.TriggerHapticPulse(750); + LastClickAngle = Pointer.CurrentPointVector; + } else if (!Pointer.PointOnNavMesh && IsClicking) IsClicking = false; } - } + } else //CurrentTeleportState == TeleportState.None { // At this point the user is not holding down on the touchpad at all or has canceled a teleport and hasn't @@ -291,12 +305,12 @@ void Update () } /// \brief Represents the player's current use of the teleport machanic. -public enum TeleportState -{ - /// The player is not using teleportation right now - None, - /// The player is currently selecting a teleport destination (holding down on touchpad) - Selecting, - /// The player has selected a teleport destination and is currently teleporting now (fading in/out) - Teleporting -} \ No newline at end of file +public enum TeleportState +{ + /// The player is not using teleportation right now + None, + /// The player is currently selecting a teleport destination (holding down on touchpad) + Selecting, + /// The player has selected a teleport destination and is currently teleporting now (fading in/out) + Teleporting +} diff --git a/Assets/Vive-Teleporter/Shader/FadeBlack.shader b/Assets/Vive-Teleporter/Shader/FadeBlack.shader index db228a7..de0cf89 100644 --- a/Assets/Vive-Teleporter/Shader/FadeBlack.shader +++ b/Assets/Vive-Teleporter/Shader/FadeBlack.shader @@ -1,4 +1,6 @@ -Shader "Custom/FadeBlack" +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Custom/FadeBlack" { Properties { @@ -35,7 +37,7 @@ v2f vert (appdata v) { v2f o; - o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + o.vertex = UnityObjectToClipPos(v.vertex); return o; } diff --git a/Assets/Vive-Teleporter/Shader/TransparentNoOverlap.shader b/Assets/Vive-Teleporter/Shader/TransparentNoOverlap.shader index c8c758d..8046527 100644 --- a/Assets/Vive-Teleporter/Shader/TransparentNoOverlap.shader +++ b/Assets/Vive-Teleporter/Shader/TransparentNoOverlap.shader @@ -1,4 +1,6 @@ -Shader "Custom/Depth Modulated (No Transparent Overlap)" +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Custom/Depth Modulated (No Transparent Overlap)" { Properties { @@ -37,7 +39,7 @@ v2f vert(appdata v) { v2f o; - o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + o.vertex = UnityObjectToClipPos(v.vertex); o.uv = v.uv; return o; } diff --git a/Assets/Vive-Teleporter/Shader/ViveMovementBorder.shader b/Assets/Vive-Teleporter/Shader/ViveMovementBorder.shader index 67d2bdb..6f29e65 100644 --- a/Assets/Vive-Teleporter/Shader/ViveMovementBorder.shader +++ b/Assets/Vive-Teleporter/Shader/ViveMovementBorder.shader @@ -1,4 +1,6 @@ -Shader "Custom/Vive Movement Border" +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Custom/Vive Movement Border" { Properties { @@ -37,7 +39,7 @@ v2f vert(appdata v) { v2f o; - o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + o.vertex = UnityObjectToClipPos(v.vertex); o.uv = v.uv; return o; } diff --git a/Assets/Vive-Teleporter/Shader/ViveMovementGrid.shader b/Assets/Vive-Teleporter/Shader/ViveMovementGrid.shader index 9b88266..1bf390b 100644 --- a/Assets/Vive-Teleporter/Shader/ViveMovementGrid.shader +++ b/Assets/Vive-Teleporter/Shader/ViveMovementGrid.shader @@ -1,4 +1,6 @@ -Shader "Custom/Vive Movement Grid" +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Custom/Vive Movement Grid" { Properties { @@ -38,7 +40,7 @@ v2f vert(appdata v) { v2f o; - o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + o.vertex = UnityObjectToClipPos(v.vertex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex); o.uv = worldPos.xz / _TexScale; diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 1d2cbb0..cbbf03e 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 10 + serializedVersion: 11 productGUID: 4c98f33a8a16db547bb3a2493bc66f16 AndroidProfiler: 0 defaultScreenOrientation: 4 @@ -15,7 +15,7 @@ PlayerSettings: defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1} - m_ShowUnitySplashScreen: 0 + m_ShowUnitySplashScreen: 1 m_ShowUnitySplashLogo: 1 m_SplashScreenOverlayOpacity: 1 m_SplashScreenAnimation: 1 @@ -85,6 +85,7 @@ PlayerSettings: xboxEnableFitness: 0 visibleInBackground: 1 allowFullscreenSwitch: 1 + graphicsJobMode: 0 macFullscreenMode: 2 d3d9FullscreenMode: 1 d3d11FullscreenMode: 1 @@ -95,7 +96,6 @@ PlayerSettings: n3dsDisableStereoscopicView: 0 n3dsEnableSharedListOpt: 1 n3dsEnableVSync: 0 - uiUse16BitDepthBuffer: 0 ignoreAlphaClear: 0 xboxOneResolution: 0 xboxOneMonoLoggingLevel: 0 @@ -118,27 +118,44 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleIdentifier: com.Company.ProductName bundleVersion: 1.0 preloadedAssets: [] metroInputSource: 0 m_HolographicPauseOnTrackingLoss: 1 xboxOneDisableKinectGpuReservation: 0 + xboxOneEnable7thCore: 0 + vrSettings: + cardboard: + depthFormat: 0 + enableTransitionView: 0 + daydream: + depthFormat: 0 + useSustainedPerformanceMode: 0 + hololens: + depthFormat: 1 protectGraphicsMemory: 0 + useHDRDisplay: 0 + applicationIdentifier: + Android: com.Company.ProductName + Standalone: unity.DefaultCompany.Navmesh-Graphic-Generator + Tizen: com.Company.ProductName + iOS: com.Company.ProductName + tvOS: com.Company.ProductName + buildNumber: + iOS: 0 AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 9 + AndroidMinSdkVersion: 16 + AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: - apiCompatibilityLevel: 2 stripEngineCode: 1 iPhoneStrippingLevel: 0 iPhoneScriptCallOptimization: 0 - iPhoneBuildNumber: 0 ForceInternetPermission: 0 ForceSDCardPermission: 0 CreateWallpaper: 0 APKExpansionFiles: 0 - preloadShaders: 0 + keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 0 VertexChannelCompressionMask: serializedVersion: 2 @@ -190,7 +207,12 @@ PlayerSettings: iOSURLSchemes: [] iOSBackgroundModes: 0 iOSMetalForceHardShadows: 0 + metalEditorSupport: 1 + metalAPIValidation: 1 appleDeveloperTeamID: + iOSManualSigningProvisioningProfileID: + tvOSManualSigningProvisioningProfileID: + appleEnableAutomaticSigning: 0 AndroidTargetDevice: 0 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} @@ -242,16 +264,115 @@ PlayerSettings: cameraUsageDescription: locationUsageDescription: microphoneUsageDescription: - XboxTitleId: - XboxImageXexPath: - XboxSpaPath: - XboxGenerateSpa: 0 - XboxDeployKinectResources: 0 - XboxSplashScreen: {fileID: 0} - xboxEnableSpeech: 0 - xboxAdditionalTitleMemorySize: 0 - xboxDeployKinectHeadOrientation: 0 - xboxDeployKinectHeadPosition: 0 + switchNetLibKey: + switchSocketMemoryPoolSize: 6144 + switchSocketAllocatorPoolSize: 128 + switchSocketConcurrencyLimit: 14 + switchUseCPUProfiler: 0 + switchApplicationID: 0x0005000C10000001 + switchNSODependencies: + switchTitleNames_0: + switchTitleNames_1: + switchTitleNames_2: + switchTitleNames_3: + switchTitleNames_4: + switchTitleNames_5: + switchTitleNames_6: + switchTitleNames_7: + switchTitleNames_8: + switchTitleNames_9: + switchTitleNames_10: + switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: + switchPublisherNames_0: + switchPublisherNames_1: + switchPublisherNames_2: + switchPublisherNames_3: + switchPublisherNames_4: + switchPublisherNames_5: + switchPublisherNames_6: + switchPublisherNames_7: + switchPublisherNames_8: + switchPublisherNames_9: + switchPublisherNames_10: + switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: + switchIcons_0: {fileID: 0} + switchIcons_1: {fileID: 0} + switchIcons_2: {fileID: 0} + switchIcons_3: {fileID: 0} + switchIcons_4: {fileID: 0} + switchIcons_5: {fileID: 0} + switchIcons_6: {fileID: 0} + switchIcons_7: {fileID: 0} + switchIcons_8: {fileID: 0} + switchIcons_9: {fileID: 0} + switchIcons_10: {fileID: 0} + switchIcons_11: {fileID: 0} + switchIcons_12: {fileID: 0} + switchIcons_13: {fileID: 0} + switchIcons_14: {fileID: 0} + switchSmallIcons_0: {fileID: 0} + switchSmallIcons_1: {fileID: 0} + switchSmallIcons_2: {fileID: 0} + switchSmallIcons_3: {fileID: 0} + switchSmallIcons_4: {fileID: 0} + switchSmallIcons_5: {fileID: 0} + switchSmallIcons_6: {fileID: 0} + switchSmallIcons_7: {fileID: 0} + switchSmallIcons_8: {fileID: 0} + switchSmallIcons_9: {fileID: 0} + switchSmallIcons_10: {fileID: 0} + switchSmallIcons_11: {fileID: 0} + switchSmallIcons_12: {fileID: 0} + switchSmallIcons_13: {fileID: 0} + switchSmallIcons_14: {fileID: 0} + switchManualHTML: + switchAccessibleURLs: + switchLegalInformation: + switchMainThreadStackSize: 1048576 + switchPresenceGroupId: 0x0005000C10000001 + switchLogoHandling: 0 + switchReleaseVersion: 0 + switchDisplayVersion: 1.0.0 + switchStartupUserAccount: 0 + switchTouchScreenUsage: 0 + switchSupportedLanguagesMask: 0 + switchLogoType: 0 + switchApplicationErrorCodeCategory: + switchUserAccountSaveDataSize: 0 + switchUserAccountSaveDataJournalSize: 0 + switchAttribute: 0 + switchCardSpecSize: 4 + switchCardSpecClock: 25 + switchRatingsMask: 0 + switchRatingsInt_0: 0 + switchRatingsInt_1: 0 + switchRatingsInt_2: 0 + switchRatingsInt_3: 0 + switchRatingsInt_4: 0 + switchRatingsInt_5: 0 + switchRatingsInt_6: 0 + switchRatingsInt_7: 0 + switchRatingsInt_8: 0 + switchRatingsInt_9: 0 + switchRatingsInt_10: 0 + switchRatingsInt_11: 0 + switchLocalCommunicationIds_0: 0x0005000C10000001 + switchLocalCommunicationIds_1: + switchLocalCommunicationIds_2: + switchLocalCommunicationIds_3: + switchLocalCommunicationIds_4: + switchLocalCommunicationIds_5: + switchLocalCommunicationIds_6: + switchLocalCommunicationIds_7: + switchParentalControl: 0 + switchAllowsScreenshot: 1 + switchDataLossConfirmation: 0 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: @@ -264,6 +385,7 @@ PlayerSettings: ps4ParamSfxPath: ps4VideoOutPixelFormat: 0 ps4VideoOutInitialWidth: 1920 + ps4VideoOutBaseModeInitialWidth: 1920 ps4VideoOutReprojectionRate: 120 ps4PronunciationXMLPath: ps4PronunciationSIGPath: @@ -286,6 +408,7 @@ PlayerSettings: ps4ApplicationParam4: 0 ps4DownloadDataSize: 0 ps4GarlicHeapSize: 2048 + ps4ProGarlicHeapSize: 2560 ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ ps4UseDebugIl2cppLibs: 0 ps4pnSessions: 1 @@ -311,6 +434,9 @@ PlayerSettings: ps4attribShareSupport: 0 ps4attribExclusiveVR: 0 ps4disableAutoHideSplash: 0 + ps4videoRecordingFeaturesUsed: 0 + ps4contentSearchFeaturesUsed: 0 + ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] monoEnv: psp2Splashimage: {fileID: 0} @@ -366,6 +492,7 @@ PlayerSettings: spritePackerPolicy: webGLMemorySize: 256 webGLExceptionSupport: 1 + webGLNameFilesAsHashes: 0 webGLDataCaching: 0 webGLDebugSymbols: 0 webGLEmscriptenArgs: @@ -382,6 +509,7 @@ PlayerSettings: WebPlayer: 0 incrementalIl2cppBuild: {} additionalIl2CppArgs: + apiCompatibilityLevelPerPlatform: {} m_RenderingPath: 1 m_MobileRenderingPath: 1 metroPackageName: Navmesh-Graphic-Generator @@ -457,9 +585,16 @@ PlayerSettings: XboxOneSplashScreen: {fileID: 0} XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 - vrEditorSettings: {} + xboxOneScriptCompiler: 0 + vrEditorSettings: + daydream: + daydreamIconForeground: {fileID: 0} + daydreamIconBackground: {fileID: 0} cloudServicesEnabled: {} + facebookSdkVersion: 7.9.1 + apiCompatibilityLevel: 2 cloudProjectId: projectName: organizationId: cloudEnabled: 0 + enableNewInputSystem: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 7cc068a..ca09a3d 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 5.5.0p3 +m_EditorVersion: 5.6.0f3