diff --git a/Assets/Material/07 - Default.mat b/Assets/Material/Default.mat similarity index 99% rename from Assets/Material/07 - Default.mat rename to Assets/Material/Default.mat index 1642a88..6afe9be 100644 --- a/Assets/Material/07 - Default.mat +++ b/Assets/Material/Default.mat @@ -20,7 +20,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: 07 - Default + m_Name: Default m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} m_ValidKeywords: [] m_InvalidKeywords: [] diff --git a/Assets/Material/07 - Default.mat.meta b/Assets/Material/Default.mat.meta similarity index 100% rename from Assets/Material/07 - Default.mat.meta rename to Assets/Material/Default.mat.meta diff --git a/Assets/Material/Head.mat b/Assets/Material/Head.mat new file mode 100644 index 0000000..8c10450 --- /dev/null +++ b/Assets/Material/Head.mat @@ -0,0 +1,135 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2938502657991910120 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Head + m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3} + m_ValidKeywords: + - _ALPHAPREMULTIPLY_ON + - _RECEIVE_SHADOWS_OFF + - _SURFACE_TYPE_TRANSPARENT + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + disabledShaderPasses: + - DepthOnly + - SHADOWCASTER + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _Blend: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 10 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossinessSource: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueOffset: 0 + - _ReceiveShadows: 0 + - _Shininess: 0 + - _Smoothness: 0.5 + - _SmoothnessSource: 0 + - _SmoothnessTextureChannel: 0 + - _SpecSource: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 1 + - _WorkflowMode: 0 + - _ZWrite: 0 + m_Colors: + - _BaseColor: {r: 0.63774544, g: 0.742691, b: 0.888, a: 0.9019608} + - _Color: {r: 0.63774544, g: 0.742691, b: 0.888, a: 0.9019608} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Script/Camera.meta b/Assets/Material/Head.mat.meta similarity index 52% rename from Assets/Script/Camera.meta rename to Assets/Material/Head.mat.meta index 745a836..c1cf29a 100644 --- a/Assets/Script/Camera.meta +++ b/Assets/Material/Head.mat.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: ec53dcc57d04ff941b2974ead0217a06 -folderAsset: yes -DefaultImporter: +guid: 7e16beeddf2a66649a08686cdd54c2ef +NativeFormatImporter: externalObjects: {} + mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Material/LHand.mat b/Assets/Material/LHand.mat index 6acb1f5..eb45a7b 100644 --- a/Assets/Material/LHand.mat +++ b/Assets/Material/LHand.mat @@ -124,8 +124,8 @@ Material: - _WorkflowMode: 1 - _ZWrite: 0 m_Colors: - - _BaseColor: {r: 1, g: 0.40452066, b: 0.27599996, a: 0.8} - - _Color: {r: 1, g: 0.40452063, b: 0.27599993, a: 0.8} + - _BaseColor: {r: 1, g: 0.40452063, b: 0.27599993, a: 0.7490196} + - _Color: {r: 1, g: 0.4045206, b: 0.2759999, a: 0.7490196} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Material/RHand.mat b/Assets/Material/RHand.mat index f1b718d..0965103 100644 --- a/Assets/Material/RHand.mat +++ b/Assets/Material/RHand.mat @@ -140,10 +140,10 @@ Material: - _WorkflowMode: 1 - _ZWrite: 0 m_Colors: - - _BaseColor: {r: 0.29600006, g: 0.6600001, b: 1, a: 0.8} + - _BaseColor: {r: 0.29600003, g: 0.6600001, b: 1, a: 0.7490196} - _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0} - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0} - - _Color: {r: 0.29600003, g: 0.6600001, b: 1, a: 0.8} + - _Color: {r: 0.296, g: 0.6600001, b: 1, a: 0.7490196} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0} - _SpecColor: {r: 0.19999993, g: 0.19999993, b: 0.19999993, a: 1} diff --git a/Assets/Scenes/WACVR.unity b/Assets/Scenes/WACVR.unity index ff702d0..d0dd5ed 100644 --- a/Assets/Scenes/WACVR.unity +++ b/Assets/Scenes/WACVR.unity @@ -5342,6 +5342,103 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 1774209490} m_PrefabAsset: {fileID: 0} +--- !u!1 &946855116 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 946855117} + - component: {fileID: 946855120} + - component: {fileID: 946855119} + - component: {fileID: 946855118} + m_Layer: 3 + m_Name: Head Cube Face + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &946855117 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 946855116} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.141, z: 0.5993} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.2} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1514989168} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &946855118 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 946855116} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &946855119 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 946855116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7e16beeddf2a66649a08686cdd54c2ef, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &946855120 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 946855116} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!65 &948374057 BoxCollider: m_ObjectHideFlags: 0 @@ -8642,7 +8739,8 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.15, y: 0.075, z: 0.075} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 946855117} m_Father: {fileID: 2095231903} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -8679,7 +8777,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + - {fileID: 2100000, guid: 7e16beeddf2a66649a08686cdd54c2ef, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -9840,8 +9938,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: target: {fileID: 0} - smoothSpeed: 0.125 - PositionOffset: {x: 0, y: 0, z: 0} + smoothSpeed: 0.05 FPS: 60 --- !u!114 &1740661844 MonoBehaviour: diff --git a/Assets/Script/Camera/Camera.asmdef b/Assets/Script/Camera/Camera.asmdef deleted file mode 100644 index b68c8d8..0000000 --- a/Assets/Script/Camera/Camera.asmdef +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "Camera" -} diff --git a/Assets/Script/Camera/Camera.asmdef.meta b/Assets/Script/Camera/Camera.asmdef.meta deleted file mode 100644 index dbc6ac2..0000000 --- a/Assets/Script/Camera/Camera.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2dcfcfc00d4ac7749bb60698b85f1dc2 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Script/Configuration/Config.cs b/Assets/Script/Configuration/Config.cs index c1687c5..31c3afa 100644 --- a/Assets/Script/Configuration/Config.cs +++ b/Assets/Script/Configuration/Config.cs @@ -45,7 +45,7 @@ public class Config FPS144 = 7 } public float SpectatorFOV = 40; - public float SpectatorSmooth = 0.125f; + public float SpectatorSmooth = 0.05f; public float[] TPCamPosition = new float[3] { -0.6f, 1.8f, -1.2f }; public float[] TPCamRotation = new float[3] { 23, 35, 0 }; public float HandSize = 8f; diff --git a/Assets/Script/Configuration/ConfigManager.cs b/Assets/Script/Configuration/ConfigManager.cs index cbc646f..b2690f1 100644 --- a/Assets/Script/Configuration/ConfigManager.cs +++ b/Assets/Script/Configuration/ConfigManager.cs @@ -61,7 +61,7 @@ public class ConfigManager : MonoBehaviour { isSavingConfig = true; saverTimer = 0; - Debug.Log("Saving config file"); + //Debug.Log("Saving config file"); } public void saveFileWait() { diff --git a/Assets/Script/Configuration/ValueManager.cs b/Assets/Script/Configuration/ValueManager.cs index 2de8e74..bf06af0 100644 --- a/Assets/Script/Configuration/ValueManager.cs +++ b/Assets/Script/Configuration/ValueManager.cs @@ -8,7 +8,19 @@ using TMPro; public class ValueManager : MonoBehaviour { TMP_Text tmp; - public float Value; + public float Value + { + get + { + return _value; + } + set + { + _value = value; + onValueChanged?.Invoke(); + } + } + private float _value; float tempValue; public bool isPointerDown = false; public UnityEvent onValueChanged = new UnityEvent(); @@ -25,12 +37,11 @@ public class ValueManager : MonoBehaviour ChangeValueContinue(tempValue); } } - public void ChangeValueContinue(float _value) + public void ChangeValueContinue(float __value) { - tempValue = _value; - Value += Time.deltaTime * _value; + tempValue = __value; + Value += Time.deltaTime * __value; isPointerDown = true; - onValueChanged?.Invoke(); } public void PointerState(bool state) { @@ -39,10 +50,9 @@ public class ValueManager : MonoBehaviour public void ResetValue() { Value = 0; - onValueChanged?.Invoke(); } public void UpdateText() { - tmp.text = String.Format("{0:F2}", Value); + tmp.text = String.Format("{0:F2}", _value); } } diff --git a/Assets/Script/Camera/CameraSmooth.cs b/Assets/Script/Essential/CameraSmooth.cs similarity index 80% rename from Assets/Script/Camera/CameraSmooth.cs rename to Assets/Script/Essential/CameraSmooth.cs index 96bf7cf..dfd2712 100644 --- a/Assets/Script/Camera/CameraSmooth.cs +++ b/Assets/Script/Essential/CameraSmooth.cs @@ -3,8 +3,7 @@ using UnityEngine; public class CameraSmooth : MonoBehaviour { public Transform target; - public float smoothSpeed = 0.125f; - public Vector3 PositionOffset; + public float smoothSpeed = 0.05f; public int FPS = 60; private void Start() { @@ -14,7 +13,7 @@ public class CameraSmooth : MonoBehaviour { void Update () { if (target == null) return; - transform.position = Vector3.Lerp(transform.position, target.position + PositionOffset, smoothSpeed); + transform.position = Vector3.Lerp(transform.position, target.position, smoothSpeed); transform.rotation = Quaternion.Lerp(transform.rotation, target.rotation, smoothSpeed); } } diff --git a/Assets/Script/Camera/CameraSmooth.cs.meta b/Assets/Script/Essential/CameraSmooth.cs.meta similarity index 100% rename from Assets/Script/Camera/CameraSmooth.cs.meta rename to Assets/Script/Essential/CameraSmooth.cs.meta diff --git a/Assets/Script/TouchManager/TouchManager.cs b/Assets/Script/TouchManager/TouchManager.cs index 1471e47..0cacc6b 100644 --- a/Assets/Script/TouchManager/TouchManager.cs +++ b/Assets/Script/TouchManager/TouchManager.cs @@ -102,8 +102,6 @@ public class TouchManager : MonoBehaviour // Debug.Log("Sending Right"); SendTouch(ComR, TouchPackR); } - if (ConfigManager.config.useIPCTouch) - IPCManager.SetTouchData(TouchPackAll); //send touch data to IPC } IEnumerator TouchTest(bool State) //this is a touch test code @@ -249,6 +247,8 @@ public class TouchManager : MonoBehaviour Area += Area / 5 * 3 + 7; ByteHelper.SetBit(TouchPackL, Area, State); } + if (ConfigManager.config.useIPCTouch) + IPCManager.SetTouchData(TouchPackAll); //send touch data to IPC } }