From 71c44eb39e52201047d8118dbd1f2c01afdb1eb3 Mon Sep 17 00:00:00 2001 From: TIBOfdg Date: Tue, 3 Feb 2026 18:50:04 +0100 Subject: [PATCH] Improve diapason --- .../Diapason/DiapasonVibrating.anim | 134 +---- .../Prefabs/Player/Player.prefab | 532 +++++++++++++++++- .../Scenes/MainScene/MainScene.unity | 454 ++++++++++++++- .../Scripts/Audio/AudioListenable.cs | 56 -- .../Scripts/Audio/AudioListenableEvent.cs | 91 --- .../Audio/AudioListenableEvent.cs.meta | 2 - .../Scripts/Audio/PortalAudioProxy.cs | 30 - .../Scripts/Audio/ThroughWallListener.cs | 102 ---- .../Scripts/Audio/ThroughWallListener.cs.meta | 2 - .../Editor/AudioListenableBatchSetup.cs | 181 ------ .../Editor/AudioListenableBatchSetup.cs.meta | 2 - .../Player/DiapasonListeningHandler.cs | 188 ++++++- 12 files changed, 1172 insertions(+), 602 deletions(-) delete mode 100644 Assets/Unheimlich_POC/Scripts/Audio/AudioListenableEvent.cs delete mode 100644 Assets/Unheimlich_POC/Scripts/Audio/AudioListenableEvent.cs.meta delete mode 100644 Assets/Unheimlich_POC/Scripts/Audio/ThroughWallListener.cs delete mode 100644 Assets/Unheimlich_POC/Scripts/Audio/ThroughWallListener.cs.meta delete mode 100644 Assets/Unheimlich_POC/Scripts/Editor/AudioListenableBatchSetup.cs delete mode 100644 Assets/Unheimlich_POC/Scripts/Editor/AudioListenableBatchSetup.cs.meta diff --git a/Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim index 10b1143b..b0257391 100644 --- a/Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim +++ b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim @@ -19,7 +19,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: {x: -21.519, y: -80.993, z: 1.943} + value: {x: -13.962, y: -81.368, z: 3.173} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -28,16 +28,7 @@ AnimationClip: outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 time: 0.05 - value: {x: -18.819, y: -81.149, z: 2.395} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.06666667 - value: {x: -21.569, y: -80.99, z: 1.935} + value: {x: -8.964, y: -81.52, z: 3.94} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -47,14 +38,14 @@ AnimationClip: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - path: + path: Render m_PositionCurves: - curve: serializedVersion: 2 m_Curve: - serializedVersion: 3 time: 0 - value: {x: 0.54888463, y: -0.15939617, z: 1.152984} + value: {x: 0.02978146, y: -0.008299127, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -63,16 +54,7 @@ AnimationClip: outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 time: 0.05 - value: {x: 0.5675328, y: -0.16608095, z: 1.152984} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.06666667 - value: {x: 0.5485432, y: -0.1592654, z: 1.152984} + value: {x: 0.06574321, y: -0.015231445, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -82,7 +64,7 @@ AnimationClip: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - path: + path: Render m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: [] @@ -94,7 +76,7 @@ AnimationClip: m_ClipBindingConstant: genericBindings: - serializedVersion: 2 - path: 0 + path: 2482019420 attribute: 1 script: {fileID: 0} typeID: 4 @@ -103,7 +85,7 @@ AnimationClip: isIntCurve: 0 isSerializeReferenceCurve: 0 - serializedVersion: 2 - path: 0 + path: 2482019420 attribute: 4 script: {fileID: 0} typeID: 4 @@ -117,7 +99,7 @@ AnimationClip: m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 - m_StopTime: 0.06666667 + m_StopTime: 0.05 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 @@ -139,7 +121,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 0.54888463 + value: 0.02978146 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -148,16 +130,7 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.05 - value: 0.5675328 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.06666667 - value: 0.5485432 + value: 0.06574321 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -168,7 +141,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalPosition.x - path: + path: Render classID: 4 script: {fileID: 0} flags: 0 @@ -178,7 +151,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: -0.15939617 + value: -0.008299127 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -187,16 +160,7 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.05 - value: -0.16608095 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.06666667 - value: -0.1592654 + value: -0.015231445 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -207,7 +171,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalPosition.y - path: + path: Render classID: 4 script: {fileID: 0} flags: 0 @@ -217,7 +181,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 1.152984 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -226,16 +190,7 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.05 - value: 1.152984 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.06666667 - value: 1.152984 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -246,7 +201,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalPosition.z - path: + path: Render classID: 4 script: {fileID: 0} flags: 0 @@ -256,7 +211,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: -21.519 + value: -13.962 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -265,16 +220,7 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.05 - value: -18.819 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.06666667 - value: -21.569 + value: -8.964 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -285,7 +231,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: localEulerAnglesRaw.x - path: + path: Render classID: 4 script: {fileID: 0} flags: 16 @@ -295,7 +241,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: -80.993 + value: -81.368 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -304,16 +250,7 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.05 - value: -81.149 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.06666667 - value: -80.99 + value: -81.52 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -324,7 +261,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: localEulerAnglesRaw.y - path: + path: Render classID: 4 script: {fileID: 0} flags: 16 @@ -334,7 +271,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 1.943 + value: 3.173 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -343,16 +280,7 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.05 - value: 2.395 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.06666667 - value: 1.935 + value: 3.94 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -363,7 +291,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: localEulerAnglesRaw.z - path: + path: Render classID: 4 script: {fileID: 0} flags: 16 @@ -376,7 +304,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.x - path: + path: Render classID: 4 script: {fileID: 0} flags: 0 @@ -388,7 +316,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.y - path: + path: Render classID: 4 script: {fileID: 0} flags: 0 @@ -400,10 +328,10 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.z - path: + path: Render classID: 4 script: {fileID: 0} flags: 0 - m_HasGenericRootTransform: 1 + m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] diff --git a/Assets/Unheimlich_POC/Prefabs/Player/Player.prefab b/Assets/Unheimlich_POC/Prefabs/Player/Player.prefab index d68e73ff..3e5da1e9 100644 --- a/Assets/Unheimlich_POC/Prefabs/Player/Player.prefab +++ b/Assets/Unheimlich_POC/Prefabs/Player/Player.prefab @@ -1,5 +1,147 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &1381762191753066586 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5740478472778989778} + - component: {fileID: 5267471927234851806} + - component: {fileID: 2498695925866410083} + - component: {fileID: 3597136791217450810} + - component: {fileID: 7569272480943586756} + m_Layer: 0 + m_Name: Capsule (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5740478472778989778 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381762191753066586} + serializedVersion: 2 + m_LocalRotation: {x: -0.5742183, y: -0.14736228, z: 0.7800533, w: 0.20018607} + m_LocalPosition: {x: -0.961, y: 0.757, z: 0.756} + m_LocalScale: {x: 0.25, y: 0.5, z: 0.25} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3566501737476280457} + m_LocalEulerAnglesHint: {x: 0, y: -72.716, z: 151.213} +--- !u!33 &5267471927234851806 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381762191753066586} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &2498695925866410083 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381762191753066586} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!136 &3597136791217450810 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381762191753066586} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &7569272480943586756 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381762191753066586} + serializedVersion: 5 + m_Mass: 1 + m_LinearDamping: 0 + m_AngularDamping: 0.05 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 1, y: 1, z: 1} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 1 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!1 &2911834610010628020 GameObject: m_ObjectHideFlags: 0 @@ -90,6 +232,264 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2911834610010628020} m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &3160628286671291482 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6609825781669214630} + - component: {fileID: 7095609529870862724} + - component: {fileID: 8750362618641014642} + - component: {fileID: 1473214508527721385} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6609825781669214630 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3160628286671291482} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.872, y: 1.28, z: 1.002} + m_LocalScale: {x: 0.4, y: 0.4, z: 0.4} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 3566501737476280457} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &7095609529870862724 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3160628286671291482} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &8750362618641014642 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3160628286671291482} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!135 &1473214508527721385 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3160628286671291482} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &3850840283490192288 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4989552644080556030} + - component: {fileID: 1782302012954113280} + - component: {fileID: 7674897756009081809} + - component: {fileID: 8829434907447304672} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4989552644080556030 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3850840283490192288} + serializedVersion: 2 + m_LocalRotation: {x: -0.41919068, y: -0.41919068, z: 0.5694552, w: 0.5694552} + m_LocalPosition: {x: -1.125, y: 0.326, z: 0.181} + m_LocalScale: {x: 0.25, y: 0.53, z: 0.25} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3566501737476280457} + m_LocalEulerAnglesHint: {x: 0, y: -72.715, z: 90} +--- !u!33 &1782302012954113280 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3850840283490192288} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &7674897756009081809 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3850840283490192288} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!136 &8829434907447304672 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3850840283490192288} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &4939242273377611689 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7995227628065693158} + m_Layer: 0 + m_Name: ArmPivot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7995227628065693158 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4939242273377611689} + serializedVersion: 2 + m_LocalRotation: {x: 0.25328645, y: -0.18117897, z: -0.13273516, w: 0.9409578} + m_LocalPosition: {x: -0.38364562, y: -0.17199996, z: 0.053447425} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3566501737476280457} + m_Father: {fileID: 487052691499411837} + m_LocalEulerAnglesHint: {x: 25.377, y: -26.859, z: -22.213} --- !u!1 &5065452309140610958 GameObject: m_ObjectHideFlags: 0 @@ -140,6 +540,40 @@ MonoBehaviour: _walkBobSpeed: 15 _walkBobAmplitude: 0.1 _resetSpeed: 5 +--- !u!1 &5252385172435588906 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3566501737476280457} + m_Layer: 0 + m_Name: ArmDistance + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3566501737476280457 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5252385172435588906} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.19957, y: -0.28199998, z: 0.12099999} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4989552644080556030} + - {fileID: 5740478472778989778} + - {fileID: 6609825781669214630} + m_Father: {fileID: 7995227628065693158} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &8240327778457960307 GameObject: m_ObjectHideFlags: 0 @@ -183,7 +617,6 @@ Transform: m_Children: - {fileID: 6982185339454062415} - {fileID: 7498738043038890726} - - {fileID: 253341405320884814} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!136 &7491646674988902879 @@ -387,6 +820,10 @@ MonoBehaviour: m_Calls: [] m_ActionId: 02f096f9-cab3-45f3-906c-5d551c7fca4f m_ActionName: 'Player/Diapason[/Keyboard/tab]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: a3ec6166-3b8f-4545-9fa4-40583be0fc66 + m_ActionName: Player/Fire m_NeverAutoSwitchControlSchemes: 0 m_DefaultControlScheme: m_DefaultActionMap: @@ -499,7 +936,6 @@ MonoBehaviour: _diapasonObject: {fileID: 3833126793998633073} _diapasonAnimator: {fileID: 3326093237010115507} _playerCamera: {fileID: 4106604842127079875} - _cursorTransform: {fileID: 0} _listeningRange: 5 _listenableLayers: serializedVersion: 2 @@ -535,13 +971,21 @@ MonoBehaviour: _cameraPanSpeed: 2 _cameraPanBorderSize: 0.1 _maxCameraPanAngle: 15 + _cameraAlignmentSpeed: 3 + _cameraAlignmentThreshold: 0.5 _vignetteIntensity: 0.5 _vignetteEffect: {fileID: 3919526576499794210} + _handTouchFeedback: {fileID: 0} + _diapasonParticles: {fileID: 0} _breathInClip: {fileID: 0} _diapasonTapClip: {fileID: 0} + _diapasonTapVolume: 1 _ambientAttenuationAmount: 0.3 _audioFadeDuration: 0.5 + _touchDistance: 2 _diapasonAction: {fileID: 0} + _lookAction: {fileID: 0} + _fireAction: {fileID: 0} --- !u!114 &3919526576499794210 MonoBehaviour: m_ObjectHideFlags: 0 @@ -632,7 +1076,13 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] - m_AddedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 3994211764999481036, guid: e73a3b0e274984f4d8b6a073e03d4d03, type: 3} + insertIndex: -1 + addedObject: {fileID: 253341405320884814} + - targetCorrespondingSourceObject: {fileID: 3994211764999481036, guid: e73a3b0e274984f4d8b6a073e03d4d03, type: 3} + insertIndex: -1 + addedObject: {fileID: 7995227628065693158} m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: e73a3b0e274984f4d8b6a073e03d4d03, type: 3} --- !u!4 &487052691499411837 stripped @@ -656,48 +1106,76 @@ PrefabInstance: serializedVersion: 2 m_Modification: serializedVersion: 3 - m_TransformParent: {fileID: 5383576672370031505} + m_TransformParent: {fileID: 487052691499411837} m_Modifications: - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} - propertyPath: m_LocalPosition.x - value: 0.572 - objectReference: {fileID: 0} - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} - propertyPath: m_LocalPosition.y - value: -0.16753393 - objectReference: {fileID: 0} - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} - propertyPath: m_LocalPosition.z - value: 1.1529833 - objectReference: {fileID: 0} - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + - target: {fileID: 2315210776226997430, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} propertyPath: m_LocalRotation.w - value: 0.7519007 + value: 0.75190187 objectReference: {fileID: 0} - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + - target: {fileID: 2315210776226997430, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} propertyPath: m_LocalRotation.x - value: -0.13395253 + value: -0.13395086 objectReference: {fileID: 0} - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + - target: {fileID: 2315210776226997430, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} propertyPath: m_LocalRotation.y - value: -0.6397152 + value: -0.6397146 objectReference: {fileID: 0} - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + - target: {fileID: 2315210776226997430, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} propertyPath: m_LocalRotation.z - value: -0.08640981 + value: -0.08640652 objectReference: {fileID: 0} - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + - target: {fileID: 2315210776226997430, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: -18.179 objectReference: {fileID: 0} - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + - target: {fileID: 2315210776226997430, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: -81.182 objectReference: {fileID: 0} - - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + - target: {fileID: 2315210776226997430, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 2.5 objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalPosition.x + value: 0.78281003 + objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalPosition.y + value: -0.6192932 + objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalPosition.z + value: 1.138 + objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9926423 + objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalRotation.z + value: 0.121084325 + objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5629947512209565818, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 13.909 + objectReference: {fileID: 0} - target: {fileID: 8689584738786529861, guid: 2812cddb6de789b46ac9d640bb9ce410, type: 3} propertyPath: m_Name value: Diapason diff --git a/Assets/Unheimlich_POC/Scenes/MainScene/MainScene.unity b/Assets/Unheimlich_POC/Scenes/MainScene/MainScene.unity index 21f6ed8b..62388fcd 100644 --- a/Assets/Unheimlich_POC/Scenes/MainScene/MainScene.unity +++ b/Assets/Unheimlich_POC/Scenes/MainScene/MainScene.unity @@ -344,6 +344,184 @@ Mesh: - serializedVersion: 1 m_IndexStart: 0 m_IndexCount: 0 +--- !u!43 &362502328 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: pb_Mesh-365220 + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 84 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 39 + localAABB: + m_Center: {x: 0.033644676, y: 7.270544, z: 0} + m_Extent: {x: 14.425397, y: 7.270544, z: 13.130945} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: 00000100020001000300020001000400030004000500030002000300060003000700060003000500070005000800070009000a000b0009000c000a000d000b000e000d0009000b000f00100011000f001200100013001100140013000f001100150016001700150018001600190017001a001900150017001b001c001d001b001e001c001f001d0020001f001b001d00210022002300210024002200240025002200240026002500 + m_VertexData: + serializedVersion: 3 + m_VertexCount: 39 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 3 + - stream: 0 + offset: 12 + format: 0 + dimension: 3 + - stream: 0 + offset: 24 + format: 0 + dimension: 4 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 40 + format: 0 + dimension: 2 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 48 + format: 0 + dimension: 4 + - stream: 0 + offset: 64 + format: 0 + dimension: 4 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 3120 + _typelessdata: 9e4466c1000000005a1852c1000000000000803f000000000000803f0000000000000000000080bf9e4466c15a1852c100000000000000000000000000000000000000000000000000000000000000009e4466c10000000000000000000000000000803f000000000000803f0000000000000000000080bf9e4466c100000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a1852c1000000000000803f000000000000803f0000000000000000000080bf000000005a1852c10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000803f000000000000803f0000000000000000000080bf000000000000000000000000000000000000000000000000000000000000000000000000000000009e4466c1000000005a185241000000000000803f000000000000803f0000000000000000000080bf9e4466c15a185241000000000000000000000000000000000000000000000000000000000000000000000000000000005a185241000000000000803f000000000000803f0000000000000000000080bf000000005a18524100000000000000000000000000000000000000000000000000000000000000009e446641000000005a1852c1000000000000803f000000000000803f0000000000000000000080bf9e4466415a1852c100000000000000000000000000000000000000000000000000000000000000009e4466410000000000000000000000000000803f000000000000803f0000000000000000000080bf9e4466410000000000000000000000000000000000000000000000000000000000000000000000009e446641000000005a185241000000000000803f000000000000803f0000000000000000000080bf9e4466415a18524100000000000000000000000000000000000000000000000000000000000000009e4466414ca8684100000000000080bf00000000000000000000000000000000000080bf000080bf000000004ca8684100000000000000000000000000000000000000000000000000000000000000009e446641000000005a1852c1000080bf00000000000000000000000000000000000080bf000080bf5a1852410000000000000000000000000000000000000000000000000000000000000000000000009e4466410000000000000000000080bf00000000000000000000000000000000000080bf000080bf000000000000000000000000000000000000000000000000000000000000000000000000000000009e4466414ca86841581852c1000080bf00000000000000000000000000000000000080bf000080bf581852414ca8684100000000000000000000000000000000000000000000000000000000000000009e4466414ca8684158185241000080bf00000000000000000000000000000000000080bf000080bf581852c14ca8684100000000000000000000000000000000000000000000000000000000000000009e446641000000005a185241000080bf00000000000000000000000000000000000080bf000080bf5a1852c1000000000000000000000000000000000000000000000000000000000000000000000000000000004ca8684158185241000000009fd70cb4000080bf0000803f0000000000000000000080bf000000004aa8684100000000000000000000000000000000000000000000000000000000000000009e446641000000005a185241000000009fd70cb4000080bf0000803f0000000000000000000080bf9e4466418c2ce7b5000000000000000000000000000000000000000000000000000000000000000000000000000000005a185241000000009fd70cb4000080bf0000803f0000000000000000000080bf000000008c2ce7b500000000000000000000000000000000000000000000000000000000000000009e4466414ca8684158185241000000009fd70cb4000080bf0000803f0000000000000000000080bf9e4466414aa8684100000000000000000000000000000000000000000000000000000000000000009e4466c14ca8684158185241000000009fd70cb4000080bf0000803f0000000000000000000080bf9e4466c14aa8684100000000000000000000000000000000000000000000000000000000000000009e4466c1000000005a185241000000009fd70cb4000080bf0000803f0000000000000000000080bf9e4466c18c2ce7b500000000000000000000000000000000000000000000000000000000000000009e4466c14ca86841000000000000803f000000000000000000000000000000000000803f000080bf000000004ca8684100000000000000000000000000000000000000000000000000000000000000009e4466c1000000005a1852410000803f000000000000000000000000000000000000803f000080bf5a1852410000000000000000000000000000000000000000000000000000000000000000000000009e4466c100000000000000000000803f000000000000000000000000000000000000803f000080bf000000000000000000000000000000000000000000000000000000000000000000000000000000009e4466c14ca86841581852410000803f000000000000000000000000000000000000803f000080bf581852414ca8684100000000000000000000000000000000000000000000000000000000000000009e4466c14ca86841581852c10000803f000000000000000000000000000000000000803f000080bf581852c14ca8684100000000000000000000000000000000000000000000000000000000000000009e4466c1000000005a1852c10000803f000000000000000000000000000000000000803f000080bf5a1852c1000000000000000000000000000000000000000000000000000000000000000000000000000000004ca86841581852c1000000009fd70cb40000803f000080bf0000000000000000000080bf000000004aa8684100000000000000000000000000000000000000000000000000000000000000009e4466c1000000005a1852c1000000009fd70cb40000803f000080bf0000000000000000000080bf9e4466418c2ce7b5000000000000000000000000000000000000000000000000000000000000000000000000000000005a1852c1000000009fd70cb40000803f000080bf0000000000000000000080bf000000008c2ce7b500000000000000000000000000000000000000000000000000000000000000009e4466c14ca86841581852c1000000009fd70cb40000803f000080bf0000000000000000000080bf9e4466414aa8684100000000000000000000000000000000000000000000000000000000000000009e4466414ca86841581852c1000000009fd70cb40000803f000080bf0000000000000000000080bf9e4466c14aa8684100000000000000000000000000000000000000000000000000000000000000009e446641000000005a1852c1000000009fd70cb40000803f000080bf0000000000000000000080bf9e4466c18c2ce7b500000000000000000000000000000000000000000000000000000000000000003c5867414ca86841581852c100000000000080bf00000000000080bf0000000000000000000080bf3c5867c1581852c100000000000000000000000000000000000000000000000000000000000000009e4466c14ca868410000000000000000000080bf00000000000080bf0000000000000000000080bf9e4466410000000000000000000000000000000000000000000000000000000000000000000000009e4466c14ca86841581852c100000000000080bf00000000000080bf0000000000000000000080bf9e446641581852c100000000000000000000000000000000000000000000000000000000000000003c5867414ca868410000000000000000000080bf00000000000080bf0000000000000000000080bf3c5867c10000000000000000000000000000000000000000000000000000000000000000000000009e4466c14ca868415818524100000000000080bf00000000000080bf0000000000000000000080bf9e4466415818524100000000000000000000000000000000000000000000000000000000000000003c5867414ca868415818524100000000000080bf00000000000080bf0000000000000000000080bf3c5867c1581852410000000000000000000000000000000000000000000000000000000000000000 + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0.033644676, y: 7.270544, z: 0} + m_Extent: {x: 14.425397, y: 7.270544, z: 13.130945} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &410087039 GameObject: m_ObjectHideFlags: 0 @@ -703,6 +881,91 @@ Transform: - {fileID: 1296540339} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &996694521 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1308658098883283559, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 362502328} + - target: {fileID: 1450394912075574427, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 1854617385} + - target: {fileID: 2146349534604163061, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 1854617385} + - target: {fileID: 3333400177076133643, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalPosition.x + value: 21.748556 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalPosition.y + value: 0.00000039198335 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalPosition.z + value: 35.542416 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5856947998729604413, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 1854617385} + - target: {fileID: 6433754577218517818, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 362502328} + - target: {fileID: 7994283466214186746, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_Name + value: RoomToLoadFour + objectReference: {fileID: 0} + - target: {fileID: 8209576767969738346, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 362502328} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3} --- !u!114 &1121804270 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1414,6 +1677,184 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1842095239} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!43 &1854617385 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: pb_Mesh-365160 + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 120 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 56 + localAABB: + m_Center: {x: 1.5878825, y: 2.0809317, z: -0.43092784} + m_Extent: {x: 1.5878825, y: 2.0809317, z: 0.43092784} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: 0000010002000000020003000400050006000400060007000800090000000800000003000a00050004000a0004000b0009000b0004000900040000000c000d000e000c000e000f001000110012001000120013000e00140015000e0015000f00120011001600120016001700120017001400120014000e00180019001a0018001a001b001c001d001e001c001e001f002000210022002000220023002400250026002400270025002800260029002800240026002a002b002c002a002d002b002e002c002f002e002a002c0030002f00310030002e002f00320033003400320035003300360034003700360032003400 + m_VertexData: + serializedVersion: 3 + m_VertexCount: 56 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 3 + - stream: 0 + offset: 12 + format: 0 + dimension: 3 + - stream: 0 + offset: 24 + format: 0 + dimension: 4 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 40 + format: 0 + dimension: 2 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 48 + format: 0 + dimension: 4 + - stream: 0 + offset: 64 + format: 0 + dimension: 4 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 4480 + _typelessdata: feff3f3ff85b6a4080be58bf0000000000000000000080bf0000803f0000000000000000000080bffeff3f3ff85b6a400000000000000000000000000000000000000000000000000000000000000000feff3f3f0000000080be58bf0000000000000000000080bf0000803f0000000000000000000080bffeff3f3f000000000000000000000000000000000000000000000000000000000000000000000000000000b40000000080be58bf0000000000000000000080bf0000803f0000000000000000000080bf000000b4000000000000000000000000000000000000000000000000000000000000000000000000000000b4f85b6a4080be58bf0000000000000000000080bf0000803f0000000000000000000080bf000000b4f85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f1b40f85b6a4080be58bf0000000000000000000080bf0000803f0000000000000000000080bfbc3f1b40f85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f4b40f85b6a4080be58bf0000000000000000000080bf0000803f0000000000000000000080bfbc3f4b40f85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f4b400000000080be58bf0000000000000000000080bf0000803f0000000000000000000080bfbc3f4b40000000000000000000000000000000000000000000000000000000000000000000000000bc3f1b400000000080be58bf0000000000000000000080bf0000803f0000000000000000000080bfbc3f1b40000000000000000000000000000000000000000000000000000000000000000000000000000000b4fc2d854080be58bf0000000000000000000080bf0000803f0000000000000000000080bf000000b4fc2d85400000000000000000000000000000000000000000000000000000000000000000feff3f3ffc2d854080be58bf0000000000000000000080bf0000803f0000000000000000000080bffeff3f3ffc2d85400000000000000000000000000000000000000000000000000000000000000000bc3f4b40fc2d854080be58bf0000000000000000000080bf0000803f0000000000000000000080bfbc3f4b40fc2d85400000000000000000000000000000000000000000000000000000000000000000bc3f1b40fc2d854080be58bf0000000000000000000080bf0000803f0000000000000000000080bfbc3f1b40fc2d85400000000000000000000000000000000000000000000000000000000000000000000000b4000000000000000000000000000000000000803f000080bf0000000000000000000080bf00000034000000000000000000000000000000000000000000000000000000000000000000000000feff3f3f000000000000000000000000000000000000803f000080bf0000000000000000000080bffeff3fbf000000000000000000000000000000000000000000000000000000000000000000000000feff3f3ff85b6a400000000000000000000000000000803f000080bf0000000000000000000080bffeff3fbff85b6a400000000000000000000000000000000000000000000000000000000000000000000000b4f85b6a400000000000000000000000000000803f000080bf0000000000000000000080bf00000034f85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f4b40000000000000000000000000000000000000803f000080bf0000000000000000000080bfbc3f4bc0000000000000000000000000000000000000000000000000000000000000000000000000bc3f4b40f85b6a400000000000000000000000000000803f000080bf0000000000000000000080bfbc3f4bc0f85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f1b40f85b6a400000000000000000000000000000803f000080bf0000000000000000000080bfbc3f1bc0f85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f1b40000000000000000000000000000000000000803f000080bf0000000000000000000080bfbc3f1bc0000000000000000000000000000000000000000000000000000000000000000000000000feff3f3ffc2d85400000000000000000000000000000803f000080bf0000000000000000000080bffeff3fbffc2d85400000000000000000000000000000000000000000000000000000000000000000000000b4fc2d85400000000000000000000000000000803f000080bf0000000000000000000080bf00000034fc2d85400000000000000000000000000000000000000000000000000000000000000000bc3f4b40fc2d85400000000000000000000000000000803f000080bf0000000000000000000080bfbc3f4bc0fc2d85400000000000000000000000000000000000000000000000000000000000000000bc3f1b40fc2d85400000000000000000000000000000803f000080bf0000000000000000000080bfbc3f1bc0fc2d85400000000000000000000000000000000000000000000000000000000000000000bc3f1b40f85b6a400000000000000000000080bf00000000000080bf0000000000000000000080bfbc3f1bc0000000000000000000000000000000000000000000000000000000000000000000000000feff3f3ff85b6a400000000000000000000080bf00000000000080bf0000000000000000000080bffeff3fbf000000000000000000000000000000000000000000000000000000000000000000000000feff3f3ff85b6a4080be58bf00000000000080bf00000000000080bf0000000000000000000080bffeff3fbf80be58bf0000000000000000000000000000000000000000000000000000000000000000bc3f1b40f85b6a4080be58bf00000000000080bf00000000000080bf0000000000000000000080bfbc3f1bc080be58bf0000000000000000000000000000000000000000000000000000000000000000bc3f1b40f85b6a4000000000000080bf00000000000000000000000000000000000080bf000080bf00000000f85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f1b40f85b6a4080be58bf000080bf00000000000000000000000000000000000080bf000080bf80be583ff85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f1b400000000080be58bf000080bf00000000000000000000000000000000000080bf000080bf80be583f000000000000000000000000000000000000000000000000000000000000000000000000bc3f1b400000000000000000000080bf00000000000000000000000000000000000080bf000080bf00000000000000000000000000000000000000000000000000000000000000000000000000000000feff3f3ff85b6a4080be58bf0000803f000000000000000000000000000000000000803f000080bf80be58bff85b6a400000000000000000000000000000000000000000000000000000000000000000feff3f3ff85b6a40000000000000803f000000000000000000000000000000000000803f000080bf00000000f85b6a400000000000000000000000000000000000000000000000000000000000000000feff3f3f00000000000000000000803f000000000000000000000000000000000000803f000080bf00000000000000000000000000000000000000000000000000000000000000000000000000000000feff3f3f0000000080be58bf0000803f000000000000000000000000000000000000803f000080bf80be58bf000000000000000000000000000000000000000000000000000000000000000000000000000000b4f85b6a4093a25cbf000080bf00000000000000000000000000000000000080bf000080bf93a25c3ff85b6a400000000000000000000000000000000000000000000000000000000000000000000000b40000000000000000000080bf00000000000000000000000000000000000080bf000080bf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000b4f85b6a4000000000000080bf00000000000000000000000000000000000080bf000080bf00000000f85b6a400000000000000000000000000000000000000000000000000000000000000000000000b40000000093a25cbf000080bf00000000000000000000000000000000000080bf000080bf93a25c3f000000000000000000000000000000000000000000000000000000000000000000000000000000b4fc2d854093a25cbf000080bf00000000000000000000000000000000000080bf000080bf93a25c3ffc2d85400000000000000000000000000000000000000000000000000000000000000000000000b4fc2d854000000000000080bf00000000000000000000000000000000000080bf000080bf00000000fc2d85400000000000000000000000000000000000000000000000000000000000000000feff3f3ffc2d854093a25cbf000000000000803f000000000000803f0000000000000000000080bffeff3f3f93a25cbf0000000000000000000000000000000000000000000000000000000000000000000000b4fc2d854000000000000000000000803f000000000000803f0000000000000000000080bf000000b4000000000000000000000000000000000000000000000000000000000000000000000000feff3f3ffc2d854000000000000000000000803f000000000000803f0000000000000000000080bffeff3f3f000000000000000000000000000000000000000000000000000000000000000000000000000000b4fc2d854093a25cbf000000000000803f000000000000803f0000000000000000000080bf000000b493a25cbf0000000000000000000000000000000000000000000000000000000000000000bc3f1b40fc2d854093a25cbf000000000000803f000000000000803f0000000000000000000080bfbc3f1b4093a25cbf0000000000000000000000000000000000000000000000000000000000000000bc3f1b40fc2d854000000000000000000000803f000000000000803f0000000000000000000080bfbc3f1b40000000000000000000000000000000000000000000000000000000000000000000000000bc3f4b40fc2d854093a25cbf000000000000803f000000000000803f0000000000000000000080bfbc3f4b4093a25cbf0000000000000000000000000000000000000000000000000000000000000000bc3f4b40fc2d854000000000000000000000803f000000000000803f0000000000000000000080bfbc3f4b40000000000000000000000000000000000000000000000000000000000000000000000000bc3f4b40f85b6a4093a25cbf0000803f000000000000000000000000000000000000803f000080bf93a25cbff85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f4b40fc2d8540000000000000803f000000000000000000000000000000000000803f000080bf00000000fc2d85400000000000000000000000000000000000000000000000000000000000000000bc3f4b40f85b6a40000000000000803f000000000000000000000000000000000000803f000080bf00000000f85b6a400000000000000000000000000000000000000000000000000000000000000000bc3f4b40fc2d854093a25cbf0000803f000000000000000000000000000000000000803f000080bf93a25cbffc2d85400000000000000000000000000000000000000000000000000000000000000000bc3f4b400000000093a25cbf0000803f000000000000000000000000000000000000803f000080bf93a25cbf000000000000000000000000000000000000000000000000000000000000000000000000bc3f4b4000000000000000000000803f000000000000000000000000000000000000803f000080bf00000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 1.5878825, y: 2.0809317, z: -0.43092784} + m_Extent: {x: 1.5878825, y: 2.0809317, z: 0.43092784} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!43 &1871114643 Mesh: m_ObjectHideFlags: 0 @@ -2532,7 +2973,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5383576672370031505, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3} propertyPath: m_LocalPosition.x - value: -5 + value: 13.95 objectReference: {fileID: 0} - target: {fileID: 5383576672370031505, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3} propertyPath: m_LocalPosition.y @@ -2540,7 +2981,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5383576672370031505, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3} propertyPath: m_LocalPosition.z - value: 25.9 + value: 31.63 objectReference: {fileID: 0} - target: {fileID: 5383576672370031505, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3} propertyPath: m_LocalRotation.w @@ -2606,6 +3047,14 @@ PrefabInstance: propertyPath: _groundedGravity value: -2 objectReference: {fileID: 0} + - target: {fileID: 7569272480943586756, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3} + propertyPath: m_UseGravity + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7569272480943586756, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3} + propertyPath: m_IsKinematic + value: 1 + objectReference: {fileID: 0} - target: {fileID: 8240327778457960307, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3} propertyPath: m_Name value: Player @@ -2667,3 +3116,4 @@ SceneRoots: - {fileID: 837458842} - {fileID: 1287162436} - {fileID: 673917528} + - {fileID: 996694521} diff --git a/Assets/Unheimlich_POC/Scripts/Audio/AudioListenable.cs b/Assets/Unheimlich_POC/Scripts/Audio/AudioListenable.cs index 23721561..6e9891d3 100644 --- a/Assets/Unheimlich_POC/Scripts/Audio/AudioListenable.cs +++ b/Assets/Unheimlich_POC/Scripts/Audio/AudioListenable.cs @@ -59,12 +59,6 @@ namespace Unheimlich.Audio [SerializeField] private float _maxDistance = 10f; [SerializeField] private AnimationCurve _distanceAttenuation = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); - [Header("Vibration Settings")] - [SerializeField] private bool _enableVibration = true; - [SerializeField] private float _vibrationIntensityMin = 0.1f; - [SerializeField] private float _vibrationIntensityMax = 0.5f; - [SerializeField] private float _vibrationFrequency = 10f; - [Header("Visual Feedback")] [SerializeField] private ParticleSystem _emitterParticles; @@ -168,17 +162,6 @@ namespace Unheimlich.Audio duration); } - public void ResetConcentrationVolume() - { - TweenHelper.CancelTween(ref _concentrationFadeTweenId); - - if (_continuousAudioSource == null) - return; - - float baselineVolume = _continuousBaseVolume * BASELINE_VOLUME_MULTIPLIER; - _continuousAudioSource.volume = baselineVolume; - } - /// /// Starts the listening sequence for this emitter. /// Blocked if the emitter has already been tapped during this session. @@ -253,9 +236,6 @@ namespace Unheimlich.Audio _audioSource.loop = _loopStaticAudio; _audioSource.Play(); } - - if (_enableVibration) - StartVibration(); } /// @@ -295,7 +275,6 @@ namespace Unheimlich.Audio } EnableReverb(false); - StopVibration(); } private void Update() @@ -311,8 +290,6 @@ namespace Unheimlich.Audio PlayProceduralSound(); _nextProceduralEventTime = _listeningTimer + Random.Range(_durationMin, _durationMax); } - - UpdateVibration(); } @@ -420,39 +397,6 @@ namespace Unheimlich.Audio } } - private void StartVibration() - { - if (Gamepad.current == null) - return; - - float distance = Vector3.Distance(_listenerPosition, transform.position); - float distanceFactor = Mathf.Clamp01(1f - (distance / _maxDistance)); - float intensity = Mathf.Lerp(_vibrationIntensityMin, _vibrationIntensityMax, distanceFactor); - - Gamepad.current.SetMotorSpeeds(intensity, intensity); - } - - private void UpdateVibration() - { - if (!_enableVibration || Gamepad.current == null) - return; - - float distance = Vector3.Distance(_listenerPosition, transform.position); - float distanceFactor = Mathf.Clamp01(1f - (distance / _maxDistance)); - float intensity = Mathf.Lerp(_vibrationIntensityMin, _vibrationIntensityMax, distanceFactor); - - float vibrationPattern = Mathf.Abs(Mathf.Sin(Time.time * _vibrationFrequency)); - intensity *= vibrationPattern; - - Gamepad.current.SetMotorSpeeds(intensity, intensity); - } - - private void StopVibration() - { - if (Gamepad.current != null) - Gamepad.current.SetMotorSpeeds(0f, 0f); - } - private void OnDisable() { StopListening(); diff --git a/Assets/Unheimlich_POC/Scripts/Audio/AudioListenableEvent.cs b/Assets/Unheimlich_POC/Scripts/Audio/AudioListenableEvent.cs deleted file mode 100644 index 9e86895a..00000000 --- a/Assets/Unheimlich_POC/Scripts/Audio/AudioListenableEvent.cs +++ /dev/null @@ -1,91 +0,0 @@ -using UnityEngine; -using UnityEngine.Events; - -namespace Unheimlich.Audio -{ - public class AudioListenableEvent : MonoBehaviour - { - [Header("Event Settings")] - [SerializeField] private bool _triggerOnce = false; - [SerializeField] private float _delayBeforeEvent = 0f; - - [Header("Events")] - [SerializeField] private UnityEvent _onListeningStarted; - [SerializeField] private UnityEvent _onListeningStopped; - [SerializeField] private UnityEvent _onFirstListen; - - private AudioListenable _listenable; - private bool _hasBeenListenedTo = false; - private bool _isCurrentlyListening = false; - - private void Awake() - { - _listenable = GetComponent(); - if (_listenable == null) - { - Debug.LogError($"AudioListenableEvent on {gameObject.name} requires AudioListenable component!"); - enabled = false; - } - } - - private void Update() - { - if (_listenable == null) - return; - - bool wasListening = _isCurrentlyListening; - - if (wasListening && !_isCurrentlyListening) - { - OnListeningStopped(); - } - } - - public void OnListeningStart() - { - if (_triggerOnce && _hasBeenListenedTo) - return; - - _isCurrentlyListening = true; - - if (_delayBeforeEvent > 0) - Invoke(nameof(TriggerListeningStartedEvent), _delayBeforeEvent); - else - TriggerListeningStartedEvent(); - - if (!_hasBeenListenedTo) - { - _hasBeenListenedTo = true; - _onFirstListen?.Invoke(); - } - } - - private void TriggerListeningStartedEvent() - { - _onListeningStarted?.Invoke(); - } - - private void OnListeningStopped() - { - _isCurrentlyListening = false; - _onListeningStopped?.Invoke(); - } - - public void EnableListenable() - { - if (_listenable != null) - _listenable.enabled = true; - } - - public void DisableListenable() - { - if (_listenable != null) - _listenable.enabled = false; - } - - public void ResetTrigger() - { - _hasBeenListenedTo = false; - } - } -} diff --git a/Assets/Unheimlich_POC/Scripts/Audio/AudioListenableEvent.cs.meta b/Assets/Unheimlich_POC/Scripts/Audio/AudioListenableEvent.cs.meta deleted file mode 100644 index da63aa39..00000000 --- a/Assets/Unheimlich_POC/Scripts/Audio/AudioListenableEvent.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 522dcfb634e07d240afa8ae5344fc785 \ No newline at end of file diff --git a/Assets/Unheimlich_POC/Scripts/Audio/PortalAudioProxy.cs b/Assets/Unheimlich_POC/Scripts/Audio/PortalAudioProxy.cs index 2d1813d6..327f15c5 100644 --- a/Assets/Unheimlich_POC/Scripts/Audio/PortalAudioProxy.cs +++ b/Assets/Unheimlich_POC/Scripts/Audio/PortalAudioProxy.cs @@ -249,36 +249,6 @@ namespace Unheimlich.Audio } } - private float CalculateVolumeFromDistance(float distance, AudioSource source) - { - float baseVolume = source.volume; - - AudioSourceDemo demo = source.GetComponent(); - if (demo != null) - baseVolume = demo.OriginalVolume; - - if (distance > source.maxDistance) - return 0f; - - if (distance < source.minDistance) - return baseVolume; - - switch (source.rolloffMode) - { - case AudioRolloffMode.Logarithmic: - float normalizedDist = (distance - source.minDistance) / (source.maxDistance - source.minDistance); - float logVolume = baseVolume * (1f / (1f + normalizedDist * 10f)); - return logVolume * Mathf.Pow(1f - normalizedDist, _volumeRolloffPower); - - case AudioRolloffMode.Linear: - float linearFactor = 1f - ((distance - source.minDistance) / (source.maxDistance - source.minDistance)); - linearFactor = Mathf.Pow(linearFactor, _volumeRolloffPower); - return baseVolume * Mathf.Max(0f, linearFactor); - - default: - return baseVolume; - } - } private AudioSource GetOrCreateProxy(AudioSource remoteSource) { diff --git a/Assets/Unheimlich_POC/Scripts/Audio/ThroughWallListener.cs b/Assets/Unheimlich_POC/Scripts/Audio/ThroughWallListener.cs deleted file mode 100644 index 7d329e60..00000000 --- a/Assets/Unheimlich_POC/Scripts/Audio/ThroughWallListener.cs +++ /dev/null @@ -1,102 +0,0 @@ -using UnityEngine; - -namespace Unheimlich.Audio -{ - [RequireComponent(typeof(AudioListenable))] - public class ThroughWallListener : MonoBehaviour - { - [Header("Behind Wall Detection")] - [SerializeField] private LayerMask _detectionLayers; - [SerializeField] private float _detectionDistance = 2f; - [SerializeField] private float _detectionRadius = 1f; - - [Header("Audio Feedback")] - [SerializeField] private AudioClip _nothingBehindClip; - [SerializeField] private AudioClip _somethingBehindClip; - [SerializeField] private AudioClip _importantObjectClip; - [SerializeField] private string _importantObjectTag = "Important"; - - [Header("Visual Feedback")] - [SerializeField] private GameObject _highlightEffectPrefab; - [SerializeField] private float _highlightDuration = 3f; - - private AudioSource _audioSource; - private AudioListenable _listenable; - private GameObject _currentHighlight; - - private void Awake() - { - _listenable = GetComponent(); - _audioSource = GetComponent(); - - if (_audioSource == null) - _audioSource = gameObject.AddComponent(); - } - - private void Update() - { - } - - public void OnWallListened() - { - Vector3 checkPosition = transform.position + transform.forward * (_detectionDistance * 0.5f); - - Collider[] hitColliders = Physics.OverlapSphere(checkPosition, _detectionRadius, _detectionLayers); - - if (hitColliders.Length > 0) - { - bool foundImportant = false; - - foreach (Collider col in hitColliders) - { - if (col.CompareTag(_importantObjectTag)) - { - foundImportant = true; - PlayFeedbackSound(_importantObjectClip); - ShowHighlight(col.transform.position); - break; - } - } - - if (!foundImportant) - { - PlayFeedbackSound(_somethingBehindClip); - } - } - else - { - PlayFeedbackSound(_nothingBehindClip); - } - } - - private void PlayFeedbackSound(AudioClip clip) - { - if (clip != null && _audioSource != null) - { - _audioSource.PlayOneShot(clip); - } - } - - private void ShowHighlight(Vector3 position) - { - if (_highlightEffectPrefab != null) - { - if (_currentHighlight != null) - Destroy(_currentHighlight); - - _currentHighlight = Instantiate(_highlightEffectPrefab, position, Quaternion.identity); - Destroy(_currentHighlight, _highlightDuration); - } - } - - private void OnDrawGizmosSelected() - { - Gizmos.color = Color.yellow; - Vector3 checkPosition = transform.position + transform.forward * (_detectionDistance * 0.5f); - Gizmos.DrawWireSphere(checkPosition, _detectionRadius); - - Gizmos.color = Color.blue; - Gizmos.DrawRay(transform.position, transform.forward * _detectionDistance); - } - } -} diff --git a/Assets/Unheimlich_POC/Scripts/Audio/ThroughWallListener.cs.meta b/Assets/Unheimlich_POC/Scripts/Audio/ThroughWallListener.cs.meta deleted file mode 100644 index f2e0e159..00000000 --- a/Assets/Unheimlich_POC/Scripts/Audio/ThroughWallListener.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 3fad34f7be8a64242984b14410478690 \ No newline at end of file diff --git a/Assets/Unheimlich_POC/Scripts/Editor/AudioListenableBatchSetup.cs b/Assets/Unheimlich_POC/Scripts/Editor/AudioListenableBatchSetup.cs deleted file mode 100644 index 7927f07f..00000000 --- a/Assets/Unheimlich_POC/Scripts/Editor/AudioListenableBatchSetup.cs +++ /dev/null @@ -1,181 +0,0 @@ -using UnityEngine; -using UnityEditor; -using Unheimlich.Audio; - -namespace Unheimlich.Editor -{ - public class AudioListenableBatchSetup : EditorWindow - { - private AudioEmitterType _selectedType = AudioEmitterType.Wall; - private LayerMask _targetLayer; - private bool _overwriteExisting = false; - - [MenuItem("Tools/Unheimlich/Audio Listenable Batch Setup")] - public static void ShowWindow() - { - GetWindow("Audio Batch Setup"); - } - - private void OnGUI() - { - GUILayout.Label("Batch Audio Listenable Setup", EditorStyles.boldLabel); - EditorGUILayout.Space(10); - - EditorGUILayout.HelpBox( - "This tool adds AudioListenable components to all selected GameObjects in the scene.", - MessageType.Info - ); - - EditorGUILayout.Space(5); - - _selectedType = (AudioEmitterType)EditorGUILayout.EnumPopup("Emitter Type", _selectedType); - _overwriteExisting = EditorGUILayout.Toggle("Overwrite Existing", _overwriteExisting); - - EditorGUILayout.Space(10); - - if (GUILayout.Button("Add to Selected Objects", GUILayout.Height(30))) - { - AddToSelectedObjects(); - } - - EditorGUILayout.Space(5); - - EditorGUILayout.LabelField("Quick Presets", EditorStyles.boldLabel); - - if (GUILayout.Button("Setup All Walls in Scene")) - { - SetupObjectsByName("wall", AudioEmitterType.Wall); - } - - if (GUILayout.Button("Setup All Doors in Scene")) - { - SetupObjectsByName("door", AudioEmitterType.Wood); - } - } - - private void AddToSelectedObjects() - { - GameObject[] selectedObjects = Selection.gameObjects; - - if (selectedObjects.Length == 0) - { - EditorUtility.DisplayDialog("No Selection", "Please select at least one GameObject in the scene.", "OK"); - return; - } - - int addedCount = 0; - int skippedCount = 0; - - foreach (GameObject obj in selectedObjects) - { - AudioListenable existing = obj.GetComponent(); - - if (existing != null && !_overwriteExisting) - { - skippedCount++; - continue; - } - - if (existing == null) - { - Undo.AddComponent(obj); - existing = obj.GetComponent(); - } - - ConfigureListenable(existing, _selectedType); - addedCount++; - } - - EditorUtility.DisplayDialog( - "Batch Setup Complete", - $"Added/Updated: {addedCount}\nSkipped: {skippedCount}", - "OK" - ); - } - - private void SetupObjectsByName(string nameContains, AudioEmitterType type) - { - GameObject[] allObjects = FindObjectsByType(FindObjectsSortMode.None); - int count = 0; - - foreach (GameObject obj in allObjects) - { - if (obj.name.ToLower().Contains(nameContains.ToLower())) - { - AudioListenable existing = obj.GetComponent(); - - if (existing == null) - { - Undo.AddComponent(obj); - existing = obj.GetComponent(); - } - - ConfigureListenable(existing, type); - count++; - } - } - - EditorUtility.DisplayDialog( - "Setup Complete", - $"Configured {count} objects containing '{nameContains}' as {type}", - "OK" - ); - } - - private void ConfigureListenable(AudioListenable listenable, AudioEmitterType type) - { - SerializedObject so = new SerializedObject(listenable); - - so.FindProperty("_emitterType").enumValueIndex = (int)type; - so.FindProperty("_useProceduralAudio").boolValue = true; - - switch (type) - { - case AudioEmitterType.Wall: - so.FindProperty("_baseFrequency").floatValue = 200f; - so.FindProperty("_frequencyVariation").floatValue = 20f; - so.FindProperty("_volumeMin").floatValue = 0.2f; - so.FindProperty("_volumeMax").floatValue = 0.4f; - break; - - case AudioEmitterType.Metal: - so.FindProperty("_baseFrequency").floatValue = 800f; - so.FindProperty("_frequencyVariation").floatValue = 100f; - so.FindProperty("_volumeMin").floatValue = 0.4f; - so.FindProperty("_volumeMax").floatValue = 0.7f; - break; - - case AudioEmitterType.Wood: - so.FindProperty("_baseFrequency").floatValue = 300f; - so.FindProperty("_frequencyVariation").floatValue = 50f; - so.FindProperty("_volumeMin").floatValue = 0.3f; - so.FindProperty("_volumeMax").floatValue = 0.6f; - break; - - case AudioEmitterType.Glass: - so.FindProperty("_baseFrequency").floatValue = 1200f; - so.FindProperty("_frequencyVariation").floatValue = 150f; - so.FindProperty("_volumeMin").floatValue = 0.3f; - so.FindProperty("_volumeMax").floatValue = 0.6f; - break; - - case AudioEmitterType.Stone: - so.FindProperty("_baseFrequency").floatValue = 250f; - so.FindProperty("_frequencyVariation").floatValue = 30f; - so.FindProperty("_volumeMin").floatValue = 0.3f; - so.FindProperty("_volumeMax").floatValue = 0.5f; - break; - - case AudioEmitterType.Mechanical: - so.FindProperty("_baseFrequency").floatValue = 500f; - so.FindProperty("_frequencyVariation").floatValue = 80f; - so.FindProperty("_volumeMin").floatValue = 0.4f; - so.FindProperty("_volumeMax").floatValue = 0.7f; - break; - } - - so.ApplyModifiedProperties(); - EditorUtility.SetDirty(listenable); - } - } -} diff --git a/Assets/Unheimlich_POC/Scripts/Editor/AudioListenableBatchSetup.cs.meta b/Assets/Unheimlich_POC/Scripts/Editor/AudioListenableBatchSetup.cs.meta deleted file mode 100644 index fa9f7078..00000000 --- a/Assets/Unheimlich_POC/Scripts/Editor/AudioListenableBatchSetup.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 5d813501fc2b446419db87d892d79ce3 \ No newline at end of file diff --git a/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/DiapasonListeningHandler.cs b/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/DiapasonListeningHandler.cs index 33b56ba3..ddffa372 100644 --- a/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/DiapasonListeningHandler.cs +++ b/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/DiapasonListeningHandler.cs @@ -4,6 +4,7 @@ using UnityEngine.InputSystem; using Unheimlich.Audio; using Unheimlich.Core; using Unheimlich.Utility; +using Unheimlich.Gameplay.Player; using InputManager = Unheimlich.Managers.PlayerInputManager; namespace Unheimlich.Gameplay.Player @@ -38,11 +39,14 @@ namespace Unheimlich.Gameplay.Player [SerializeField] private float _diapasonTweenDuration = 0.3f; [SerializeField] private float _diapasonHideOffset = -0.5f; [SerializeField] private AnimationCurve _diapasonTweenCurve = AnimationCurve.EaseInOut(0, 0, 1, 1); + [SerializeField] private float _vibrationDuration = 15f; [Header("Camera Settings")] [SerializeField] private float _cameraPanSpeed = 2f; [SerializeField] private float _cameraPanBorderSize = 0.1f; [SerializeField] private float _maxCameraPanAngle = 15f; + [SerializeField] private float _cameraAlignmentSpeed = 3f; + [SerializeField] private float _cameraAlignmentThreshold = 0.5f; [Header("Visual Feedback")] [SerializeField] private float _vignetteIntensity = 0.5f; @@ -78,8 +82,14 @@ namespace Unheimlich.Gameplay.Player private float _originalAmbientVolume; private Vector3 _diapasonEquippedPosition; private Vector3 _diapasonHiddenPosition; + private Vector3 _originalCameraLocalPosition; + private Vector3 _originalPlayerPosition; + private Vector3 _originalPlayerRotation; + private Vector3 _originalCameraLocalRotation; private bool _canUseDiapason; private bool _isFadingOutConcentration; + private Coroutine _returnCoroutine; + private Coroutine _vibrationCoroutine; protected override void OnAwake() { @@ -87,6 +97,15 @@ namespace Unheimlich.Gameplay.Player if (_playerAudioSource == null) _playerAudioSource = gameObject.AddComponent(); + if (_playerCamera != null) + { + _originalCameraLocalPosition = _playerCamera.transform.localPosition; + _originalCameraLocalRotation = _playerCamera.transform.localEulerAngles; + } + + _originalPlayerPosition = transform.position; + _originalPlayerRotation = transform.eulerAngles; + if (_diapasonObject != null) { _diapasonEquippedPosition = _diapasonObject.transform.localPosition; @@ -222,10 +241,11 @@ namespace Unheimlich.Gameplay.Player /// /// Main listening sequence coroutine: - /// 1. Concentration phase - player breathes in, diapason animates out - /// 2. Volume fades from 30% to 100% during concentration - /// 3. After concentration duration, enters listening mode - /// 4. Vignette appears, camera pan enabled, cursor shown + /// 1. Camera aligns perpendicular to the target object + /// 2. Concentration phase - player breathes in, diapason animates out + /// 3. Volume fades from 30% to 100% during concentration + /// 4. After concentration duration, enters listening mode + /// 5. Vignette appears, camera pan enabled, cursor shown /// private IEnumerator ListeningSequence() { @@ -233,7 +253,11 @@ namespace Unheimlich.Gameplay.Player InputManager.SetContext(InputManager.InputContext.Listening); if (_currentTargetEmitter != null) + { _currentTargetEmitter.SetConcentrating(true); + + yield return StartCoroutine(AlignCameraToTarget(_currentTargetEmitter.transform)); + } if (_diapasonObject != null) { @@ -281,6 +305,8 @@ namespace Unheimlich.Gameplay.Player /// - Stops emitter listening /// - Hides vignette and cursor /// - Re-enables player movement + /// - Restores player position, rotation and camera with lerp + /// - Resets diapason animation to idle /// private void StopListeningMode() { @@ -290,9 +316,21 @@ namespace Unheimlich.Gameplay.Player _listeningCoroutine = null; } + if (_vibrationCoroutine != null) + { + StopCoroutine(_vibrationCoroutine); + _vibrationCoroutine = null; + } + IsListening = false; IsConcentrating = false; + if (_returnCoroutine != null) + { + StopCoroutine(_returnCoroutine); + } + _returnCoroutine = StartCoroutine(ReturnToOriginalPosition()); + if (_playerAudioSource != null && _playerAudioSource.isPlaying) { TweenHelper.CancelTween(ref _playerAudioFadeTweenId); @@ -317,6 +355,7 @@ namespace Unheimlich.Gameplay.Player if (_diapasonAnimator != null) { _diapasonAnimator.SetBool(ANIM_BOOL_VIBRATING, false); + _diapasonAnimator.Play("Idle", 0, 0f); _diapasonAnimator.enabled = false; } @@ -364,6 +403,127 @@ namespace Unheimlich.Gameplay.Player _isFadingOutConcentration = false; } + /// + /// Aligns the player and camera to the target object: + /// - Player moves along target's local X axis to align with target center + /// - Player rotates to face the target + /// - Camera pitch adjusts to look at target center + /// + private IEnumerator AlignCameraToTarget(Transform target) + { + if (_playerCamera == null || target == null) + yield break; + + _originalCameraLocalPosition = _playerCamera.transform.localPosition; + _originalCameraLocalRotation = _playerCamera.transform.localEulerAngles; + _originalPlayerPosition = transform.position; + _originalPlayerRotation = transform.eulerAngles; + + Vector3 targetCenter = target.position; + Renderer targetRenderer = target.GetComponent(); + if (targetRenderer != null) + { + targetCenter = targetRenderer.bounds.center; + } + else + { + Collider targetCollider = target.GetComponent(); + if (targetCollider != null) + targetCenter = targetCollider.bounds.center; + } + + Vector3 startPlayerPos = transform.position; + Vector3 startPlayerRotation = transform.eulerAngles; + Vector3 startCameraLocalRotation = _playerCamera.transform.localEulerAngles; + + float startPitch = startCameraLocalRotation.x; + if (startPitch > 180f) + startPitch -= 360f; + + float elapsed = 0f; + float duration = 1f / _cameraAlignmentSpeed; + + while (elapsed < duration) + { + elapsed += Time.deltaTime; + float t = Mathf.SmoothStep(0f, 1f, elapsed / duration); + + Vector3 currentCameraPos = _playerCamera.transform.position; + Vector3 toTarget = targetCenter - currentCameraPos; + Vector3 directionToTarget = toTarget.normalized; + + Quaternion targetRotation = Quaternion.LookRotation(directionToTarget); + float targetYaw = targetRotation.eulerAngles.y; + float targetPitch = -Mathf.Asin(directionToTarget.y) * Mathf.Rad2Deg; + + Vector3 targetRightAxis = target.right; + Vector3 playerToTargetCenter = targetCenter - transform.position; + float offsetAlongTargetRight = Vector3.Dot(playerToTargetCenter, targetRightAxis); + Vector3 targetPlayerPos = transform.position + targetRightAxis * offsetAlongTargetRight; + + Vector3 currentPlayerPos = Vector3.Lerp(startPlayerPos, targetPlayerPos, t); + transform.position = currentPlayerPos; + + float currentYaw = Mathf.LerpAngle(startPlayerRotation.y, targetYaw, t); + transform.eulerAngles = new Vector3(0f, currentYaw, 0f); + + float currentPitch = Mathf.LerpAngle(startPitch, targetPitch, t); + _playerCamera.transform.localEulerAngles = new Vector3(currentPitch, 0f, 0f); + + yield return null; + } + } + + /// + /// Returns player and camera to original position and rotation with smooth lerp. + /// + private IEnumerator ReturnToOriginalPosition() + { + if (_playerCamera == null) + yield break; + + Vector3 startPlayerPos = transform.position; + Vector3 startPlayerRotation = transform.eulerAngles; + Vector3 startCameraLocalPos = _playerCamera.transform.localPosition; + Vector3 startCameraLocalRotation = _playerCamera.transform.localEulerAngles; + + float startPitch = startCameraLocalRotation.x; + if (startPitch > 180f) + startPitch -= 360f; + + float targetPitch = _originalCameraLocalRotation.x; + if (targetPitch > 180f) + targetPitch -= 360f; + + float elapsed = 0f; + float duration = 1f / _cameraAlignmentSpeed; + + while (elapsed < duration) + { + elapsed += Time.deltaTime; + float t = Mathf.SmoothStep(0f, 1f, elapsed / duration); + + transform.position = Vector3.Lerp(startPlayerPos, _originalPlayerPosition, t); + + float currentYaw = Mathf.LerpAngle(startPlayerRotation.y, _originalPlayerRotation.y, t); + transform.eulerAngles = new Vector3(0f, currentYaw, 0f); + + float currentPitch = Mathf.LerpAngle(startPitch, targetPitch, t); + _playerCamera.transform.localEulerAngles = new Vector3(currentPitch, 0f, 0f); + + _playerCamera.transform.localPosition = Vector3.Lerp(startCameraLocalPos, _originalCameraLocalPosition, t); + + yield return null; + } + + transform.position = _originalPlayerPosition; + transform.eulerAngles = _originalPlayerRotation; + _playerCamera.transform.localPosition = _originalCameraLocalPosition; + _playerCamera.transform.localEulerAngles = _originalCameraLocalRotation; + + _returnCoroutine = null; + } + /// /// Updates cursor position and camera panning during listening mode. /// Supports both gamepad (look input) and mouse (screen edges). @@ -485,6 +645,7 @@ namespace Unheimlich.Gameplay.Player /// - Starts listening sequence on the target emitter /// - Plays diapason particles /// - Plays tap sound + /// - Starts vibration timer to stop after duration /// private void TriggerDiapasonTap() { @@ -492,6 +653,10 @@ namespace Unheimlich.Gameplay.Player { _diapasonAnimator.SetTrigger(ANIM_TRIGGER_TAP); _diapasonAnimator.SetBool(ANIM_BOOL_VIBRATING, true); + + if (_vibrationCoroutine != null) + StopCoroutine(_vibrationCoroutine); + _vibrationCoroutine = StartCoroutine(StopVibrationAfterDuration()); } if (_diapasonTapClip != null && _playerAudioSource != null) @@ -510,6 +675,21 @@ namespace Unheimlich.Gameplay.Player } } + /// + /// Stops the diapason vibration animation after the specified duration. + /// + private IEnumerator StopVibrationAfterDuration() + { + yield return new WaitForSeconds(_vibrationDuration); + + if (_diapasonAnimator != null) + { + _diapasonAnimator.SetBool(ANIM_BOOL_VIBRATING, false); + } + + _vibrationCoroutine = null; + } + private void PlayBreathIn() { if (_breathInClip != null && _playerAudioSource != null)