diff --git a/Assets/Unheimlich_POC/Animations/Diapason/DiapasonAnimator.controller b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonAnimator.controller
index b3fd9c77..6fed8fea 100644
--- a/Assets/Unheimlich_POC/Animations/Diapason/DiapasonAnimator.controller
+++ b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonAnimator.controller
@@ -1,6 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
---- !u!1101 &-8690948310595586279
+--- !u!1102 &-7151713981270395130
+AnimatorState:
+ serializedVersion: 6
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Idle
+ m_Speed: 1
+ m_CycleOffset: 0
+ m_Transitions:
+ - {fileID: 8960433185533125710}
+ m_StateMachineBehaviours: []
+ m_Position: {x: 50, y: 50, z: 0}
+ m_IKOnFeet: 0
+ m_WriteDefaultValues: 1
+ m_Mirror: 0
+ m_SpeedParameterActive: 0
+ m_MirrorParameterActive: 0
+ m_CycleOffsetParameterActive: 0
+ m_TimeParameterActive: 0
+ m_Motion: {fileID: 7400000, guid: 03563b8dec42e5640b342370f82e7a92, type: 2}
+ m_Tag:
+ m_SpeedParameter:
+ m_MirrorParameter:
+ m_CycleOffsetParameter:
+ m_TimeParameter:
+--- !u!1101 &-6250306049290905047
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
@@ -17,40 +44,14 @@ AnimatorStateTransition:
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
- m_TransitionDuration: 0.1
+ m_TransitionDuration: 0.25
m_TransitionOffset: 0
- m_ExitTime: 0.67540425
+ m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
---- !u!1102 &-7151713981270395130
-AnimatorState:
- serializedVersion: 6
- m_ObjectHideFlags: 1
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: Idle
- m_Speed: 1
- m_CycleOffset: 0
- m_Transitions: []
- m_StateMachineBehaviours: []
- m_Position: {x: 50, y: 50, z: 0}
- m_IKOnFeet: 0
- m_WriteDefaultValues: 1
- m_Mirror: 0
- m_SpeedParameterActive: 0
- m_MirrorParameterActive: 0
- m_CycleOffsetParameterActive: 0
- m_TimeParameterActive: 0
- m_Motion: {fileID: 7400000, guid: 03563b8dec42e5640b342370f82e7a92, type: 2}
- m_Tag:
- m_SpeedParameter:
- m_MirrorParameter:
- m_CycleOffsetParameter:
- m_TimeParameter:
--- !u!1102 &-5520587529742516873
AnimatorState:
serializedVersion: 6
@@ -62,7 +63,7 @@ AnimatorState:
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- - {fileID: 1636899995371703689}
+ - {fileID: 201059481314751296}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@@ -78,6 +79,58 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
+--- !u!1102 &-2546798742115751392
+AnimatorState:
+ serializedVersion: 6
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: DiapasonVibrating
+ m_Speed: 1
+ m_CycleOffset: 0
+ m_Transitions:
+ - {fileID: -795788390475079271}
+ m_StateMachineBehaviours: []
+ m_Position: {x: 50, y: 50, z: 0}
+ m_IKOnFeet: 0
+ m_WriteDefaultValues: 1
+ m_Mirror: 0
+ m_SpeedParameterActive: 0
+ m_MirrorParameterActive: 0
+ m_CycleOffsetParameterActive: 0
+ m_TimeParameterActive: 0
+ m_Motion: {fileID: 7400000, guid: 700bd0ca2552e4948a4b0d18594ada05, type: 2}
+ m_Tag:
+ m_SpeedParameter:
+ m_MirrorParameter:
+ m_CycleOffsetParameter:
+ m_TimeParameter:
+--- !u!1101 &-795788390475079271
+AnimatorStateTransition:
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_Conditions:
+ - m_ConditionMode: 2
+ m_ConditionEvent: IsVibrating
+ m_EventTreshold: 0
+ m_DstStateMachine: {fileID: 0}
+ m_DstState: {fileID: -7151713981270395130}
+ m_Solo: 0
+ m_Mute: 0
+ m_IsExit: 0
+ serializedVersion: 3
+ m_TransitionDuration: 0.25
+ m_TransitionOffset: 0
+ m_ExitTime: 0.75
+ m_HasExitTime: 0
+ m_HasFixedDuration: 1
+ m_InterruptionSource: 0
+ m_OrderedInterruption: 1
+ m_CanTransitionToSelf: 1
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
@@ -99,6 +152,12 @@ AnimatorController:
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
+ - m_Name: IsVibrating
+ m_Type: 4
+ m_DefaultFloat: 0
+ m_DefaultInt: 0
+ m_DefaultBool: 0
+ m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@@ -112,24 +171,27 @@ AnimatorController:
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
---- !u!1101 &1636899995371703689
+--- !u!1101 &201059481314751296
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
- m_Conditions: []
+ m_Conditions:
+ - m_ConditionMode: 1
+ m_ConditionEvent: IsVibrating
+ m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
- m_DstState: {fileID: -7151713981270395130}
+ m_DstState: {fileID: -2546798742115751392}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
- m_TransitionDuration: 0.1
+ m_TransitionDuration: 0.9
m_TransitionOffset: 0
- m_ExitTime: 0.9
- m_HasExitTime: 1
+ m_ExitTime: 0.6808511
+ m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
@@ -145,18 +207,46 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -7151713981270395130}
- m_Position: {x: 30, y: 200, z: 0}
+ m_Position: {x: 50, y: 200, z: 0}
- serializedVersion: 1
m_State: {fileID: -5520587529742516873}
- m_Position: {x: 30, y: 310, z: 0}
+ m_Position: {x: -80, y: 280, z: 0}
+ - serializedVersion: 1
+ m_State: {fileID: -2546798742115751392}
+ m_Position: {x: 50, y: 360, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions:
- - {fileID: -8690948310595586279}
+ - {fileID: -6250306049290905047}
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
- m_AnyStatePosition: {x: 50, y: 400, z: 0}
- m_EntryPosition: {x: 50, y: 120, z: 0}
+ m_AnyStatePosition: {x: -130, y: 130, z: 0}
+ m_EntryPosition: {x: 70, y: 130, z: 0}
m_ExitPosition: {x: 320, y: 50, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -7151713981270395130}
+--- !u!1101 &8960433185533125710
+AnimatorStateTransition:
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_Conditions:
+ - m_ConditionMode: 1
+ m_ConditionEvent: Tap
+ m_EventTreshold: 0
+ m_DstStateMachine: {fileID: 0}
+ m_DstState: {fileID: -5520587529742516873}
+ m_Solo: 0
+ m_Mute: 0
+ m_IsExit: 0
+ serializedVersion: 3
+ m_TransitionDuration: 0
+ m_TransitionOffset: 0
+ m_ExitTime: 0
+ m_HasExitTime: 0
+ m_HasFixedDuration: 1
+ m_InterruptionSource: 0
+ m_OrderedInterruption: 1
+ m_CanTransitionToSelf: 1
diff --git a/Assets/Unheimlich_POC/Animations/Diapason/DiapasonTap.anim b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonTap.anim
index f35908c5..7ccf34a0 100644
--- a/Assets/Unheimlich_POC/Animations/Diapason/DiapasonTap.anim
+++ b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonTap.anim
@@ -44,69 +44,6 @@ AnimationClip:
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.8333333
- value: {x: -84.81, y: 0, z: 0}
- 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.8833333
- value: {x: -97.774, y: 0, z: 0}
- 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.93333334
- value: {x: -86.641, y: 0, z: 0}
- 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: 1
- value: {x: -97.651, y: 0, z: 0}
- 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: 1.0666667
- value: {x: -87.797, y: 0, z: 0}
- 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: 1.15
- value: {x: -99.184, y: 0, z: 0}
- 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: 1.2666667
- value: {x: -90, y: 0, z: 0}
- 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}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -151,69 +88,6 @@ AnimationClip:
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.8333333
- value: {x: 0, y: 0.0016489029, z: -0.037730962}
- inSlope: {x: 0, y: 0.03924848, z: 0}
- outSlope: {x: 0, y: 0.03924848, 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.8833333
- value: {x: 0, y: 0.0039248466, z: 0.056405194}
- 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.93333334
- value: {x: 0, y: 0.0006771982, z: -0.024436368}
- 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: 1
- value: {x: 0, y: 0.0038035214, z: 0.05552265}
- 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: 1.0666667
- value: {x: 0, y: 0.00028309226, z: -0.016032133}
- 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: 1.15
- value: {x: 0, y: 0.005455792, z: 0.06655883}
- 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: 1.2666667
- value: {x: 0, y: 0, z: 0}
- 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}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -252,7 +126,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
- m_StopTime: 1.2666667
+ m_StopTime: 0.78333336
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@@ -308,69 +182,6 @@ AnimationClip:
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8333333
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8833333
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.93333334
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.0666667
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.15
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.2666667
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -419,69 +230,6 @@ AnimationClip:
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8333333
- value: 0.0016489029
- inSlope: 0.03924848
- outSlope: 0.03924848
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8833333
- value: 0.0039248466
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.93333334
- value: 0.0006771982
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: 0.0038035214
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.0666667
- value: 0.00028309226
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.15
- value: 0.005455792
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.2666667
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -530,69 +278,6 @@ AnimationClip:
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8333333
- value: -0.037730962
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8833333
- value: 0.056405194
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.93333334
- value: -0.024436368
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: 0.05552265
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.0666667
- value: -0.016032133
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.15
- value: 0.06655883
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.2666667
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -632,69 +317,6 @@ AnimationClip:
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8333333
- value: -84.81
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8833333
- value: -97.774
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.93333334
- value: -86.641
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: -97.651
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.0666667
- value: -87.797
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.15
- value: -99.184
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.2666667
- value: -90
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -734,69 +356,6 @@ AnimationClip:
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8333333
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8833333
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.93333334
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.0666667
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.15
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.2666667
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -836,69 +395,6 @@ AnimationClip:
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8333333
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.8833333
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 0.93333334
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.0666667
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.15
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1.2666667
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 136
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
diff --git a/Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim
new file mode 100644
index 00000000..10b1143b
--- /dev/null
+++ b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim
@@ -0,0 +1,409 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!74 &7400000
+AnimationClip:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: DiapasonVibrating
+ serializedVersion: 7
+ m_Legacy: 0
+ m_Compressed: 0
+ m_UseHighQualityCurve: 1
+ m_RotationCurves: []
+ m_CompressedRotationCurves: []
+ m_EulerCurves:
+ - curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: {x: -21.519, y: -80.993, z: 1.943}
+ 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.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}
+ 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}
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ path:
+ m_PositionCurves:
+ - curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: {x: 0.54888463, y: -0.15939617, 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.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}
+ 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}
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ path:
+ m_ScaleCurves: []
+ m_FloatCurves: []
+ m_PPtrCurves: []
+ m_SampleRate: 60
+ m_WrapMode: 0
+ m_Bounds:
+ m_Center: {x: 0, y: 0, z: 0}
+ m_Extent: {x: 0, y: 0, z: 0}
+ m_ClipBindingConstant:
+ genericBindings:
+ - serializedVersion: 2
+ path: 0
+ attribute: 1
+ script: {fileID: 0}
+ typeID: 4
+ customType: 0
+ isPPtrCurve: 0
+ isIntCurve: 0
+ isSerializeReferenceCurve: 0
+ - serializedVersion: 2
+ path: 0
+ attribute: 4
+ script: {fileID: 0}
+ typeID: 4
+ customType: 4
+ isPPtrCurve: 0
+ isIntCurve: 0
+ isSerializeReferenceCurve: 0
+ pptrCurveMapping: []
+ m_AnimationClipSettings:
+ serializedVersion: 2
+ m_AdditiveReferencePoseClip: {fileID: 0}
+ m_AdditiveReferencePoseTime: 0
+ m_StartTime: 0
+ m_StopTime: 0.06666667
+ m_OrientationOffsetY: 0
+ m_Level: 0
+ m_CycleOffset: 0
+ m_HasAdditiveReferencePose: 0
+ m_LoopTime: 1
+ m_LoopBlend: 0
+ m_LoopBlendOrientation: 0
+ m_LoopBlendPositionY: 0
+ m_LoopBlendPositionXZ: 0
+ m_KeepOriginalOrientation: 0
+ m_KeepOriginalPositionY: 1
+ m_KeepOriginalPositionXZ: 0
+ m_HeightFromFeet: 0
+ m_Mirror: 0
+ m_EditorCurves:
+ - serializedVersion: 2
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0.54888463
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ 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
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ attribute: m_LocalPosition.x
+ path:
+ classID: 4
+ script: {fileID: 0}
+ flags: 0
+ - serializedVersion: 2
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: -0.15939617
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ 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
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ attribute: m_LocalPosition.y
+ path:
+ classID: 4
+ script: {fileID: 0}
+ flags: 0
+ - serializedVersion: 2
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1.152984
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ 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
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ attribute: m_LocalPosition.z
+ path:
+ classID: 4
+ script: {fileID: 0}
+ flags: 0
+ - serializedVersion: 2
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: -21.519
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ 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
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ attribute: localEulerAnglesRaw.x
+ path:
+ classID: 4
+ script: {fileID: 0}
+ flags: 16
+ - serializedVersion: 2
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: -80.993
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ 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
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ attribute: localEulerAnglesRaw.y
+ path:
+ classID: 4
+ script: {fileID: 0}
+ flags: 16
+ - serializedVersion: 2
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1.943
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ 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
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 136
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ attribute: localEulerAnglesRaw.z
+ path:
+ classID: 4
+ script: {fileID: 0}
+ flags: 16
+ m_EulerEditorCurves:
+ - serializedVersion: 2
+ curve:
+ serializedVersion: 2
+ m_Curve: []
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ attribute: m_LocalEulerAngles.x
+ path:
+ classID: 4
+ script: {fileID: 0}
+ flags: 0
+ - serializedVersion: 2
+ curve:
+ serializedVersion: 2
+ m_Curve: []
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ attribute: m_LocalEulerAngles.y
+ path:
+ classID: 4
+ script: {fileID: 0}
+ flags: 0
+ - serializedVersion: 2
+ curve:
+ serializedVersion: 2
+ m_Curve: []
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ attribute: m_LocalEulerAngles.z
+ path:
+ classID: 4
+ script: {fileID: 0}
+ flags: 0
+ m_HasGenericRootTransform: 1
+ m_HasMotionFloatCurves: 0
+ m_Events: []
diff --git a/Assets/Unheimlich_POC/Scripts/Audio/IMPLEMENTATION_CHECKLIST.md.meta b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim.meta
similarity index 52%
rename from Assets/Unheimlich_POC/Scripts/Audio/IMPLEMENTATION_CHECKLIST.md.meta
rename to Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim.meta
index 076aea80..96b9ef66 100644
--- a/Assets/Unheimlich_POC/Scripts/Audio/IMPLEMENTATION_CHECKLIST.md.meta
+++ b/Assets/Unheimlich_POC/Animations/Diapason/DiapasonVibrating.anim.meta
@@ -1,7 +1,8 @@
fileFormatVersion: 2
-guid: cd7d5d5d18db5a3458126a3a50a037b2
-TextScriptImporter:
+guid: 700bd0ca2552e4948a4b0d18594ada05
+NativeFormatImporter:
externalObjects: {}
+ mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Assets/Unheimlich_POC/Prefabs/Items/SoundEmitter.prefab b/Assets/Unheimlich_POC/Prefabs/Items/SoundEmitter.prefab
index 327ca5c7..b2e71812 100644
--- a/Assets/Unheimlich_POC/Prefabs/Items/SoundEmitter.prefab
+++ b/Assets/Unheimlich_POC/Prefabs/Items/SoundEmitter.prefab
@@ -171,6 +171,13 @@ MonoBehaviour:
m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Audio.AudioListenable
_emitterType: 3
_useProceduralAudio: 1
+ _emitContinuously: 1
+ _continuousBaseVolume: 0.1
+ _hearingRangeMin: 2
+ _hearingRangeMax: 8
+ _listeningVolumeMultiplier: 3
+ _proximityVolumeMultiplier: 1.5
+ _reverbWetMix: 0.5
_staticAudioClip: {fileID: 0}
_loopStaticAudio: 1
_baseFrequency: 440
@@ -208,6 +215,7 @@ MonoBehaviour:
_vibrationIntensityMin: 0.1
_vibrationIntensityMax: 0.3
_vibrationFrequency: 10
+ _emitterParticles: {fileID: 325388660204886872}
--- !u!65 &7881895566796712951
BoxCollider:
m_ObjectHideFlags: 0
@@ -318,6 +326,11 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8bb34a961d0969644bdd7a29960b46c9, type: 3}
+--- !u!198 &325388660204886872 stripped
+ParticleSystem:
+ m_CorrespondingSourceObject: {fileID: 7195447085232448540, guid: 8bb34a961d0969644bdd7a29960b46c9, type: 3}
+ m_PrefabInstance: {fileID: 7448775950719106884}
+ m_PrefabAsset: {fileID: 0}
--- !u!4 &7557053910863834421 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1134716054066844273, guid: 8bb34a961d0969644bdd7a29960b46c9, type: 3}
diff --git a/Assets/Unheimlich_POC/Prefabs/Rooms/RoomToLoadFour.prefab b/Assets/Unheimlich_POC/Prefabs/Rooms/RoomToLoadFour.prefab
index 473128a4..3462f622 100644
--- a/Assets/Unheimlich_POC/Prefabs/Rooms/RoomToLoadFour.prefab
+++ b/Assets/Unheimlich_POC/Prefabs/Rooms/RoomToLoadFour.prefab
@@ -943,7 +943,7 @@ MonoBehaviour:
m_PreserveMeshAssetOnDestroy: 0
assetGuid:
m_Mesh: {fileID: 0}
- m_VersionIndex: 5824
+ m_VersionIndex: 5866
m_IsSelectable: 1
m_SelectedFaces:
m_SelectedEdges: []
@@ -1086,6 +1086,7 @@ GameObject:
- component: {fileID: 2256722611278033653}
- component: {fileID: 199705311286279971}
- component: {fileID: 4491756047060416374}
+ - component: {fileID: 3081915229973546199}
m_Layer: 0
m_Name: SoundEmitter (3)
m_TagString: Untagged
@@ -1187,6 +1188,63 @@ SphereCollider:
serializedVersion: 3
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
+--- !u!114 &3081915229973546199
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 6971469719059241663}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: e15490f7adacb594cb114f535e71d6b6, type: 3}
+ m_Name:
+ m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Audio.AudioListenable
+ _emitterType: 2
+ _useProceduralAudio: 1
+ _emitContinuously: 1
+ _continuousBaseVolume: 0.1
+ _hearingRangeMin: 2
+ _hearingRangeMax: 8
+ _reverbWetMix: 0.5
+ _staticAudioClip: {fileID: 0}
+ _loopStaticAudio: 1
+ _baseFrequency: 440
+ _frequencyVariation: 50
+ _volumeMin: 0.3
+ _volumeMax: 0.7
+ _durationMin: 0.5
+ _durationMax: 2
+ _maxDistance: 10
+ _distanceAttenuation:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0
+ outWeight: 0
+ - serializedVersion: 3
+ time: 1
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0
+ outWeight: 0
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ _enableVibration: 1
+ _vibrationIntensityMin: 0.1
+ _vibrationIntensityMax: 0.5
+ _vibrationFrequency: 10
+ _emitterParticles: {fileID: 3614011420963205847}
--- !u!1 &7625879407957162159
GameObject:
m_ObjectHideFlags: 0
@@ -1295,6 +1353,26 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 956998766033755730}
m_Modifications:
+ - target: {fileID: 196559139152754184, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
+ propertyPath: _volumeMax
+ value: 0.4
+ objectReference: {fileID: 0}
+ - target: {fileID: 196559139152754184, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
+ propertyPath: _volumeMin
+ value: 0.2
+ objectReference: {fileID: 0}
+ - target: {fileID: 196559139152754184, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
+ propertyPath: _emitterType
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 196559139152754184, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
+ propertyPath: _baseFrequency
+ value: 200
+ objectReference: {fileID: 0}
+ - target: {fileID: 196559139152754184, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
+ propertyPath: _frequencyVariation
+ value: 20
+ objectReference: {fileID: 0}
- target: {fileID: 2822448012032697683, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
propertyPath: m_Name
value: SoundEmitter
@@ -1342,67 +1420,8 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
- m_AddedComponents:
- - targetCorrespondingSourceObject: {fileID: 2822448012032697683, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
- insertIndex: -1
- addedObject: {fileID: 5385940087340611163}
+ m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
---- !u!1 &2794013674881297554 stripped
-GameObject:
- m_CorrespondingSourceObject: {fileID: 2822448012032697683, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
- m_PrefabInstance: {fileID: 138781599420729793}
- m_PrefabAsset: {fileID: 0}
---- !u!114 &5385940087340611163
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 2794013674881297554}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: e15490f7adacb594cb114f535e71d6b6, type: 3}
- m_Name:
- m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Audio.AudioListenable
- _emitterType: 1
- _useProceduralAudio: 1
- _staticAudioClip: {fileID: 0}
- _loopStaticAudio: 1
- _baseFrequency: 200
- _frequencyVariation: 20
- _volumeMin: 0.2
- _volumeMax: 0.4
- _durationMin: 0.5
- _durationMax: 2
- _maxDistance: 10
- _distanceAttenuation:
- serializedVersion: 2
- m_Curve:
- - serializedVersion: 3
- time: 0
- value: 1
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- weightedMode: 0
- inWeight: 0
- outWeight: 0
- - serializedVersion: 3
- time: 1
- value: 0
- inSlope: 0
- outSlope: 0
- tangentMode: 0
- weightedMode: 0
- inWeight: 0
- outWeight: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- _enableVibration: 1
- _vibrationIntensityMin: 0.1
- _vibrationIntensityMax: 0.5
- _vibrationFrequency: 10
--- !u!4 &5634670077426659782 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5755410889840572423, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
@@ -1543,6 +1562,11 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8bb34a961d0969644bdd7a29960b46c9, type: 3}
+--- !u!198 &3614011420963205847 stripped
+ParticleSystem:
+ m_CorrespondingSourceObject: {fileID: 7195447085232448540, guid: 8bb34a961d0969644bdd7a29960b46c9, type: 3}
+ m_PrefabInstance: {fileID: 5907826872935323339}
+ m_PrefabAsset: {fileID: 0}
--- !u!4 &6792416700374926522 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1134716054066844273, guid: 8bb34a961d0969644bdd7a29960b46c9, type: 3}
@@ -1558,7 +1582,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 4967478502310356297, guid: e21058d2724cc5645a8770f341df17ed, type: 3}
propertyPath: m_VersionIndex
- value: 3829
+ value: 3841
objectReference: {fileID: 0}
- target: {fileID: 5627569817145768567, guid: e21058d2724cc5645a8770f341df17ed, type: 3}
propertyPath: _portalId
@@ -1634,6 +1658,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 956998766033755730}
m_Modifications:
+ - target: {fileID: 196559139152754184, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
+ propertyPath: _emitterType
+ value: 7
+ objectReference: {fileID: 0}
- target: {fileID: 2822448012032697683, guid: 01f9cdfc376629a4c813a82a095c3b3a, type: 3}
propertyPath: m_Name
value: SoundEmitter (1)
diff --git a/Assets/Unheimlich_POC/Scenes/MainScene/MainScene.unity b/Assets/Unheimlich_POC/Scenes/MainScene/MainScene.unity
index 5af62ce2..5f9e85f7 100644
--- a/Assets/Unheimlich_POC/Scenes/MainScene/MainScene.unity
+++ b/Assets/Unheimlich_POC/Scenes/MainScene/MainScene.unity
@@ -344,184 +344,6 @@ Mesh:
- serializedVersion: 1
m_IndexStart: 0
m_IndexCount: 0
---- !u!43 &304991524
-Mesh:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: pb_Mesh-312764
- 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
@@ -1220,6 +1042,98 @@ MonoBehaviour:
_extendedShadowDistance: 250
_transitionSpeed: 2
_checkInterval: 0.5
+--- !u!1 &1594544247
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1594544248}
+ - component: {fileID: 1594544250}
+ - component: {fileID: 1594544249}
+ - component: {fileID: 1594544251}
+ m_Layer: 0
+ m_Name: HandTouchFeedback
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1594544248
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1594544247}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 1296540339}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0.5, y: 0.5}
+ m_AnchorMax: {x: 0.5, y: 0.5}
+ m_AnchoredPosition: {x: -727, y: -296}
+ m_SizeDelta: {x: 100, y: 100}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1594544249
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1594544247}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!222 &1594544250
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1594544247}
+ m_CullTransparentMesh: 1
+--- !u!114 &1594544251
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1594544247}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 39b78978d656e894ea455342398ef8ba, type: 3}
+ m_Name:
+ m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Gameplay.Player.HandTouchFeedback
+ _feedbackImage: {fileID: 1594544249}
+ _readyColor: {r: 0, g: 1, b: 0, a: 1}
+ _pulseSpeed: 2
+ _pulseIntensity: 0.3
--- !u!1 &1693053744
GameObject:
m_ObjectHideFlags: 0
@@ -1368,107 +1282,6 @@ MonoBehaviour:
_recoveryDuration: 0.5
_focusRetentionTime: 0.1
_fallbackShakeIntensity: 30
---- !u!1001 &1801866815
-PrefabInstance:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- serializedVersion: 3
- m_TransformParent: {fileID: 0}
- m_Modifications:
- - target: {fileID: 240762672413097929, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: _emitterType
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 1308658098883283559, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_Mesh
- value:
- objectReference: {fileID: 304991524}
- - target: {fileID: 1450394912075574427, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_Mesh
- value:
- objectReference: {fileID: 2135157598}
- - target: {fileID: 2146349534604163061, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_Mesh
- value:
- objectReference: {fileID: 2135157598}
- - target: {fileID: 2146349534604163061, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_VersionIndex
- value: 3841
- objectReference: {fileID: 0}
- - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_LocalPosition.x
- value: 24.37
- objectReference: {fileID: 0}
- - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_LocalPosition.y
- value: -0.00000043723333
- objectReference: {fileID: 0}
- - target: {fileID: 3965737018690194595, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_LocalPosition.z
- value: 19.231745
- 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: 2135157598}
- - target: {fileID: 6433754577218517818, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_Mesh
- value:
- objectReference: {fileID: 304991524}
- - target: {fileID: 7423402686373121341, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: _emitterType
- value: 7
- objectReference: {fileID: 0}
- - target: {fileID: 7904602484025268702, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_IsActive
- value: 0
- objectReference: {fileID: 0}
- - 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: 304991524}
- - target: {fileID: 8209576767969738346, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
- propertyPath: m_VersionIndex
- value: 5839
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_RemovedGameObjects: []
- m_AddedGameObjects: []
- m_AddedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: 20e4ea3ceee86dd4ba3881425b65790d, type: 3}
--- !u!4 &1804390687 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8057303164503007523, guid: 204c7983537bb6c44a8ecafa782fca99, type: 3}
@@ -1996,184 +1809,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2089706605371115838, guid: 0048fed3be8aeb8449285faf2cc63a15, type: 3}
m_PrefabInstance: {fileID: 3614017092883427690}
m_PrefabAsset: {fileID: 0}
---- !u!43 &2135157598
-Mesh:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: pb_Mesh-312704
- 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 &2145275082
Mesh:
m_ObjectHideFlags: 0
@@ -2769,7 +2404,10 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
- m_AddedGameObjects: []
+ m_AddedGameObjects:
+ - targetCorrespondingSourceObject: {fileID: 8886833518829962744, guid: f6df2f5ea61cfcb439be39356b1560fa, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 1594544248}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f6df2f5ea61cfcb439be39356b1560fa, type: 3}
--- !u!1001 &5090177222934034458
@@ -2828,6 +2466,10 @@ PrefabInstance:
propertyPath: _breathInClip
value:
objectReference: {fileID: 8300000, guid: 091b6df1c99cbd647bce921a5ba7c1af, type: 3}
+ - target: {fileID: 3142789394009655648, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
+ propertyPath: _touchDistance
+ value: 3
+ objectReference: {fileID: 0}
- target: {fileID: 3142789394009655648, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
propertyPath: _cameraPanSpeed
value: 1
@@ -2836,6 +2478,10 @@ PrefabInstance:
propertyPath: _diapasonAction
value:
objectReference: {fileID: 1811682114}
+ - target: {fileID: 3142789394009655648, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
+ propertyPath: _listeningRange
+ value: 8
+ objectReference: {fileID: 0}
- target: {fileID: 3142789394009655648, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
propertyPath: _vignetteEffect
value:
@@ -2848,6 +2494,14 @@ PrefabInstance:
propertyPath: _diapasonAnimator
value:
objectReference: {fileID: 451500111}
+ - target: {fileID: 3142789394009655648, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
+ propertyPath: _diapasonParticles
+ value:
+ objectReference: {fileID: 5090177222934034460}
+ - target: {fileID: 3142789394009655648, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
+ propertyPath: _handTouchFeedback
+ value:
+ objectReference: {fileID: 1594544247}
- target: {fileID: 3142789394009655648, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
propertyPath: _maxCameraPanAngle
value: 8
@@ -2874,7 +2528,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5383576672370031505, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
propertyPath: m_LocalPosition.x
- value: 21.15
+ value: -5
objectReference: {fileID: 0}
- target: {fileID: 5383576672370031505, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
propertyPath: m_LocalPosition.y
@@ -2882,7 +2536,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5383576672370031505, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
propertyPath: m_LocalPosition.z
- value: 20.68
+ value: 23.7
objectReference: {fileID: 0}
- target: {fileID: 5383576672370031505, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
propertyPath: m_LocalRotation.w
@@ -2978,6 +2632,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 878ebc270c13e5c49a3813b1848f6ea5, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Gameplay.Player.ListeningVignetteEffect
+--- !u!198 &5090177222934034460 stripped
+ParticleSystem:
+ m_CorrespondingSourceObject: {fileID: 8780959910783478955, guid: 92d3cde0c88c75f48a98d082c573338b, type: 3}
+ m_PrefabInstance: {fileID: 5090177222934034458}
+ m_PrefabAsset: {fileID: 0}
--- !u!114 &5090177222934034461
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -3004,4 +2663,3 @@ SceneRoots:
- {fileID: 837458842}
- {fileID: 1287162436}
- {fileID: 673917528}
- - {fileID: 1801866815}
diff --git a/Assets/Unheimlich_POC/Scripts/Audio/AudioListenable.cs b/Assets/Unheimlich_POC/Scripts/Audio/AudioListenable.cs
index 18391bb1..45e52d11 100644
--- a/Assets/Unheimlich_POC/Scripts/Audio/AudioListenable.cs
+++ b/Assets/Unheimlich_POC/Scripts/Audio/AudioListenable.cs
@@ -1,3 +1,4 @@
+using System.Collections;
using UnityEngine;
using UnityEngine.InputSystem;
@@ -19,10 +20,28 @@ namespace Unheimlich.Audio
public class AudioListenable : MonoBehaviour
{
+ // String constants
+ private const string CONTINUOUS_AUDIO_SOURCE_NAME = "Continuous Audio Source";
+
+ // Volume multipliers for concentration system
+ private const float BASELINE_VOLUME_MULTIPLIER = 0.3f;
+ private const float FULL_VOLUME_MULTIPLIER = 1f;
+ private const float CONCENTRATION_FADE_DURATION = 1f;
+ private const float RELEASE_FADE_DURATION = 0.5f;
+
[Header("Emitter Settings")]
[SerializeField] private AudioEmitterType _emitterType = AudioEmitterType.Generic;
[SerializeField] private bool _useProceduralAudio = true;
+ [Header("Continuous Emission")]
+ [SerializeField] private bool _emitContinuously = true;
+ [SerializeField] private float _continuousBaseVolume = 0.1f;
+ [SerializeField] private float _hearingRangeMin = 4f;
+ [SerializeField] private float _hearingRangeMax = 8f;
+
+ [Header("Listening Enhancement")]
+ [SerializeField] private float _reverbWetMix = 0.5f;
+
[Header("Static Audio")]
[SerializeField] private AudioClip _staticAudioClip;
[SerializeField] private bool _loopStaticAudio = true;
@@ -45,11 +64,27 @@ namespace Unheimlich.Audio
[SerializeField] private float _vibrationIntensityMax = 0.5f;
[SerializeField] private float _vibrationFrequency = 10f;
+ [Header("Visual Feedback")]
+ [SerializeField] private ParticleSystem _emitterParticles;
+
private AudioSource _audioSource;
+ private AudioSource _continuousAudioSource;
+ private AudioReverbFilter _reverbFilter;
private bool _isCurrentlyListening;
private float _listeningTimer;
private float _nextProceduralEventTime;
private Vector3 _listenerPosition;
+ private bool _hasBeenTapped;
+ private AudioClip _continuousClip;
+ private Coroutine _volumeFadeCoroutine;
+ private Coroutine _startListeningCoroutine;
+ private Coroutine _concentrationFadeCoroutine;
+
+ ///
+ /// Returns true if this emitter has been tapped during the current listening session.
+ /// Used to prevent multiple taps on the same emitter.
+ ///
+ public bool HasBeenTapped => _hasBeenTapped;
private void Awake()
{
@@ -61,14 +96,120 @@ namespace Unheimlich.Audio
_audioSource.maxDistance = _maxDistance;
_audioSource.rolloffMode = AudioRolloffMode.Custom;
_audioSource.playOnAwake = false;
+
+ _reverbFilter = gameObject.AddComponent();
+ _reverbFilter.reverbPreset = AudioReverbPreset.Off;
+ _reverbFilter.dryLevel = 0f;
+ _reverbFilter.room = -10000;
+
+ GameObject continuousSourceObject = new GameObject(CONTINUOUS_AUDIO_SOURCE_NAME);
+ continuousSourceObject.transform.SetParent(transform);
+ continuousSourceObject.transform.localPosition = Vector3.zero;
+ _continuousAudioSource = continuousSourceObject.AddComponent();
+ _continuousAudioSource.spatialBlend = 1f;
+ _continuousAudioSource.maxDistance = _hearingRangeMax;
+ _continuousAudioSource.minDistance = _hearingRangeMin;
+ _continuousAudioSource.rolloffMode = AudioRolloffMode.Linear;
+ _continuousAudioSource.playOnAwake = false;
+ _continuousAudioSource.loop = true;
+
+ if (_emitterParticles != null)
+ {
+ _emitterParticles.Stop();
+ var emission = _emitterParticles.emission;
+ emission.enabled = false;
+ }
}
+ private void Start()
+ {
+ if (_emitContinuously && _useProceduralAudio)
+ {
+ StartContinuousEmission();
+ }
+ }
+
+ private void StartContinuousEmission()
+ {
+ float frequency = _baseFrequency + Random.Range(-_frequencyVariation * 0.5f, _frequencyVariation * 0.5f);
+ _continuousClip = GenerateProceduralAudioClip(frequency, 10f);
+
+ _continuousAudioSource.clip = _continuousClip;
+ _continuousAudioSource.volume = _continuousBaseVolume * BASELINE_VOLUME_MULTIPLIER;
+ _continuousAudioSource.loop = true;
+ _continuousAudioSource.Play();
+ }
+
+ ///
+ /// Sets the concentration state and fades the emitter volume accordingly.
+ /// When concentrating: fades from 30% to 100% over 1 second.
+ /// When releasing: fades from 100% to 30% over 0.5 seconds.
+ ///
+ public void SetConcentrating(bool concentrating)
+ {
+
+ if (_concentrationFadeCoroutine != null)
+ StopCoroutine(_concentrationFadeCoroutine);
+
+ if (concentrating)
+ {
+ _concentrationFadeCoroutine = StartCoroutine(FadeConcentrationVolume(BASELINE_VOLUME_MULTIPLIER, FULL_VOLUME_MULTIPLIER, CONCENTRATION_FADE_DURATION));
+ }
+ else
+ {
+ _concentrationFadeCoroutine = StartCoroutine(FadeConcentrationVolume(FULL_VOLUME_MULTIPLIER, BASELINE_VOLUME_MULTIPLIER, RELEASE_FADE_DURATION));
+ }
+ }
+
+ ///
+ /// Starts the listening sequence for this emitter.
+ /// Blocked if the emitter has already been tapped during this session.
+ ///
public void StartListening(Vector3 listenerPosition)
+ {
+ // Prevent multiple taps on the same emitter
+ if (_hasBeenTapped)
+ return;
+
+ if (_startListeningCoroutine != null)
+ StopCoroutine(_startListeningCoroutine);
+
+ _startListeningCoroutine = StartCoroutine(StartListeningSequence(listenerPosition));
+ }
+
+ ///
+ /// Coroutine that handles the full listening sequence:
+ /// - Crossfades from continuous to procedural audio
+ /// - Activates particles
+ /// - Marks emitter as tapped (prevents re-triggering)
+ /// - Starts vibration
+ ///
+ private IEnumerator StartListeningSequence(Vector3 listenerPosition)
{
_isCurrentlyListening = true;
_listenerPosition = listenerPosition;
_listeningTimer = 0f;
_nextProceduralEventTime = 0f;
+
+ // Mark as tapped to prevent re-triggering
+ _hasBeenTapped = true;
+
+ if (_volumeFadeCoroutine != null)
+ StopCoroutine(_volumeFadeCoroutine);
+
+ float crossfadeDuration = 1f;
+ _volumeFadeCoroutine = StartCoroutine(CrossfadeSounds(crossfadeDuration));
+
+ if (_emitterParticles != null)
+ {
+ var emission = _emitterParticles.emission;
+ emission.enabled = true;
+ _emitterParticles.Play();
+ }
+
+ EnableReverb(true);
+
+ yield return new WaitForSeconds(crossfadeDuration);
if (_useProceduralAudio)
{
@@ -85,18 +226,49 @@ namespace Unheimlich.Audio
StartVibration();
}
+ ///
+ /// Stops the listening mode and resets the emitter state.
+ /// This is the only place where _hasBeenTapped is reset to false,
+ /// allowing the emitter to be used again in a future listening session.
+ ///
public void StopListening()
{
+ bool wasBeenTapped = _hasBeenTapped;
+
_isCurrentlyListening = false;
+ _hasBeenTapped = false;
+
+ if (_volumeFadeCoroutine != null)
+ StopCoroutine(_volumeFadeCoroutine);
+
+ if (_startListeningCoroutine != null)
+ StopCoroutine(_startListeningCoroutine);
+
+ if (_concentrationFadeCoroutine != null)
+ StopCoroutine(_concentrationFadeCoroutine);
if (_audioSource != null && _audioSource.isPlaying)
_audioSource.Stop();
+ if (_emitterParticles != null && wasBeenTapped)
+ {
+ _emitterParticles.Stop();
+ var emission = _emitterParticles.emission;
+ emission.enabled = false;
+ }
+
+ if (_continuousAudioSource != null && !_continuousAudioSource.isPlaying && gameObject.activeInHierarchy)
+ {
+ StartContinuousEmission();
+ }
+
+ EnableReverb(false);
StopVibration();
}
private void Update()
{
+
if (!_isCurrentlyListening)
return;
@@ -111,6 +283,26 @@ namespace Unheimlich.Audio
UpdateVibration();
}
+
+ private void EnableReverb(bool enable)
+ {
+ if (_reverbFilter == null)
+ return;
+
+ if (enable)
+ {
+ _reverbFilter.reverbPreset = AudioReverbPreset.Room;
+ _reverbFilter.dryLevel = Mathf.Lerp(0f, -1000f, 1f - _reverbWetMix);
+ _reverbFilter.room = Mathf.Lerp(-1000f, -100f, _reverbWetMix);
+ }
+ else
+ {
+ _reverbFilter.reverbPreset = AudioReverbPreset.Off;
+ _reverbFilter.dryLevel = 0f;
+ _reverbFilter.room = -10000;
+ }
+ }
+
private void PlayProceduralSound()
{
float distance = Vector3.Distance(_listenerPosition, transform.position);
@@ -208,6 +400,59 @@ namespace Unheimlich.Audio
Gamepad.current.SetMotorSpeeds(intensity, intensity);
}
+ private IEnumerator FadeConcentrationVolume(float fromMultiplier, float toMultiplier, float duration)
+ {
+ float elapsed = 0f;
+ float baseVolume = _continuousBaseVolume;
+
+ while (elapsed < duration)
+ {
+ elapsed += Time.deltaTime;
+ float t = elapsed / duration;
+ float currentMultiplier = Mathf.Lerp(fromMultiplier, toMultiplier, t);
+
+ if (_continuousAudioSource != null)
+ {
+ _continuousAudioSource.volume = baseVolume * currentMultiplier;
+ }
+
+ yield return null;
+ }
+
+ if (_continuousAudioSource != null)
+ {
+ _continuousAudioSource.volume = baseVolume * toMultiplier;
+ }
+ }
+
+ private IEnumerator CrossfadeSounds(float fadeDuration)
+ {
+ if (_continuousAudioSource == null)
+ yield break;
+
+ float startVolume = _continuousAudioSource.volume;
+ float elapsed = 0f;
+
+ while (elapsed < fadeDuration)
+ {
+ elapsed += Time.deltaTime;
+ float t = elapsed / fadeDuration;
+
+ if (_continuousAudioSource != null)
+ {
+ _continuousAudioSource.volume = Mathf.Lerp(startVolume, 0f, t);
+ }
+
+ yield return null;
+ }
+
+ if (_continuousAudioSource != null)
+ {
+ _continuousAudioSource.volume = 0f;
+ _continuousAudioSource.Stop();
+ }
+ }
+
private void UpdateVibration()
{
if (!_enableVibration || Gamepad.current == null)
diff --git a/Assets/Unheimlich_POC/Scripts/Audio/IMPLEMENTATION_CHECKLIST.md b/Assets/Unheimlich_POC/Scripts/Audio/IMPLEMENTATION_CHECKLIST.md
deleted file mode 100644
index 2bd3871f..00000000
--- a/Assets/Unheimlich_POC/Scripts/Audio/IMPLEMENTATION_CHECKLIST.md
+++ /dev/null
@@ -1,254 +0,0 @@
-# Système d'Écoute Diapason - Checklist d'Implémentation
-
-## ✅ Scripts Créés (Compilés sans erreur)
-
-### Core System
-- [x] **DiapasonListeningHandler.cs** - Gestionnaire principal du mode écoute
-- [x] **AudioListenable.cs** - Composant pour objets écoutables
-- [x] **ListeningVignetteEffect.cs** - Effet visuel de vignette
-- [x] **AudioEmitterData.cs** - ScriptableObject pour configuration
-
-### Extensions
-- [x] **AudioListenableEvent.cs** - Événements UnityEvent pour objets écoutables
-- [x] **ThroughWallListener.cs** - Détection d'objets derrière les murs
-- [x] **DiapasonDebugger.cs** - Outils de debugging
-
-### Editor Tools
-- [x] **AudioListenableEditor.cs** - Custom Inspector avec Quick Setup
-- [x] **AudioListenableBatchSetup.cs** - Configuration en masse via EditorWindow
-
-### Data
-- [x] **9 Présets AudioEmitterData** créés dans `/Assets/Unheimlich_POC/Datas/AudioEmitters/`:
- - WallEmitter.asset
- - MetalEmitter.asset
- - WoodEmitter.asset
- - GlassEmitter.asset
- - StoneEmitter.asset
- - MechanicalEmitter.asset
- - ElectricalEmitter.asset
- - WaterEmitter.asset
- - OrganicEmitter.asset
-
-### Documentation
-- [x] **README.md** - Architecture et documentation technique
-- [x] **Page Système d'Écoute - Diapason** - Guide complet utilisateur
-
-## ⚠️ Configuration Manuelle Requise
-
-### 1. Input System Setup
-**Fichier**: `/Assets/Unheimlich_POC/Inputs/PlayerController.inputactions`
-
-**Actions à faire**:
-1. Ouvrir le fichier dans l'Input System window
-2. Dans l'Action Map "Player", ajouter une nouvelle action:
- - Nom: `Diapason`
- - Action Type: `Button`
- - Control Type: `Button`
-
-3. Ajouter les bindings:
- ```
- PS5 Controller: Triangle (Button South)
- Xbox Controller: Y (Button North)
- Keyboard: T (ou touche de votre choix)
- ```
-
-4. Sauvegarder et générer la classe C#
-
-### 2. PlayerInputManager Configuration
-**GameObject**: `/GAMEPLAY/Player`
-
-**Dans l'Inspector du PlayerInputManager**:
-1. Trouver le champ `Diapason Action`
-2. Assigner l'action "Diapason" depuis le PlayerController.inputactions
-3. Vérifier que la callback `OnDiapason` est bien configurée
-
-### 3. DiapasonListeningHandler Setup
-**GameObject**: `/GAMEPLAY/Player`
-
-**Actions**:
-1. Ajouter le composant `DiapasonListeningHandler`
-2. Assigner les références:
- - **Diapason Object**: Glisser `/GAMEPLAY/Player/Diapason`
- - **Diapason Animator**: Glisser l'Animator du Diapason
- - **Player Camera**: Glisser `/GAMEPLAY/Player/CameraPivot/Main Camera`
- - **Diapason Action**: Assigner l'InputActionReference vers l'action Diapason
-
-3. Configurer les paramètres:
- ```
- Listening Range: 5.0
- Listenable Layers: Interactable (ou créer un layer "Listenable")
- Concentration Duration: 1.0
- Breath In Duration: 0.5
- Camera Pan Speed: 2.0
- Camera Pan Border Size: 0.1
- Max Camera Pan Angle: 15.0
- Vignette Intensity: 0.5
- Ambient Attenuation Amount: 0.3
- ```
-
-### 4. Animator du Diapason
-**GameObject**: `/GAMEPLAY/Player/Diapason`
-
-**Parameters requis**:
-1. Ouvrir l'Animator Controller
-2. Ajouter les parameters:
- - `IsEquipped` (Bool)
- - `Tap` (Trigger)
-
-3. Créer les animations:
- - **Idle**: Animation de repos (peut être vide)
- - **Tap**: Animation de frappe du diapason
-
-4. Setup des transitions:
- - Any State → Tap (Condition: Trigger Tap)
- - Tap → Idle (Exit Time)
-
-### 5. Audio Clips
-**À créer ou importer**:
-
-1. **Breath In Sound** (_breathInClip):
- - Son d'inspiration profonde
- - Durée: ~0.5-1 seconde
- - Format: WAV ou MP3
-
-2. **Diapason Tap Sound** (_diapasonTapClip):
- - Son métallique de diapason
- - Durée: ~0.3-0.5 seconde
- - Légère résonance
-
-**Où les assigner**:
-- Dans le composant `DiapasonListeningHandler` sur le Player
-
-### 6. Layer Configuration (Optionnel mais Recommandé)
-**Project Settings → Tags and Layers**
-
-1. Créer un nouveau layer: `Listenable`
-2. Dans `DiapasonListeningHandler`, assigner ce layer
-3. Tous les objets avec `AudioListenable` devraient utiliser ce layer
-
-Ou réutiliser le layer existant `Interactable`.
-
-### 7. Vignette Effect (Optionnel)
-**GameObject**: `/ENVIRONMENT/Global Volume` (ou créer)
-
-**Si vous voulez l'effet de vignette**:
-1. S'assurer qu'un Global Volume existe avec URP
-2. Ajouter le composant `ListeningVignetteEffect` au Player
-3. Assigner le Global Volume
-4. Dans le DiapasonListeningHandler, assigner la référence `Vignette Effect`
-
-## 🎯 Test Initial
-
-### Test Rapide du Système
-
-1. **Enter Play Mode**
-2. Appuyer sur **T** (ou Triangle/Y sur manette)
-3. **Observer**:
- - Phase de concentration (~1 seconde)
- - Curseur apparaît
- - Le diapason devient visible
-4. **Pointer** vers un objet avec AudioListenable
-5. **Clic gauche** pour taper
-6. **Écouter** le son généré
-7. **Appuyer à nouveau sur T** pour sortir
-
-### Ajout d'Objets Écoutables pour Test
-
-**Méthode Rapide**:
-1. Sélectionner des GameObjects dans la scène (murs, portes, etc.)
-2. Menu: `Tools → Unheimlich → Audio Listenable Batch Setup`
-3. Choisir le type (ex: Wall)
-4. Cliquer "Add to Selected Objects"
-5. S'assurer que les objets ont un Collider
-6. Assigner le layer "Listenable" ou "Interactable"
-
-**Ou utiliser les presets**:
-- "Setup All Walls in Scene" - Configure tous les objets contenant "wall"
-- "Setup All Doors in Scene" - Configure tous les objets contenant "door"
-
-## 📋 Vérification Post-Setup
-
-### Checklist Finale
-
-- [ ] L'action "Diapason" existe dans PlayerController.inputactions
-- [ ] DiapasonAction est assigné dans PlayerInputManager
-- [ ] DiapasonListeningHandler est sur le Player avec toutes les références
-- [ ] L'Animator du diapason a les parameters IsEquipped et Tap
-- [ ] Au moins un objet dans la scène a AudioListenable
-- [ ] Les objets écoutables ont un Collider
-- [ ] Les objets écoutables sont sur le bon layer
-- [ ] Les AudioClips sont assignés (ou commentés pour test)
-- [ ] Aucune erreur de compilation
-
-### Test Avancé
-
-1. **Test Audio Procédural**: Vérifier différents types de matériaux
-2. **Test Vibrations**: Tester avec une manette connectée
-3. **Test Distance**: S'éloigner pour vérifier l'atténuation
-4. **Test Camera Pan**: Bouger le curseur sur les bords
-5. **Test Through Wall**: Si implémenté, tester ThroughWallListener
-
-## 🛠️ Outils Disponibles
-
-### Menu Tools
-`Tools → Unheimlich → Audio Listenable Batch Setup`
-- Configuration en masse d'objets écoutables
-- Presets automatiques par nom
-
-### Custom Inspector
-Sur un GameObject avec `AudioListenable`:
-- Boutons Quick Setup par type de matériau
-- Test en Play Mode
-
-### Debug
-Ajouter `DiapasonDebugger` au Player ou un GameObject de scene:
-- Affichage info système en temps réel
-- Liste des objets écoutables
-- Gizmos visuels
-- Context menu pour enable/disable all
-
-## 📖 Documentation
-
-### Guides Disponibles
-- **Système d'Écoute - Diapason** (Page): Guide complet utilisateur
-- **README.md** (Scripts/Audio): Architecture technique
-- **IMPLEMENTATION_CHECKLIST.md** (ce fichier): Checklist de setup
-
-### Exemples de Code
-Voir les scripts d'exemple:
-- `AudioListenableEvent.cs` - Pour ajouter des événements
-- `ThroughWallListener.cs` - Pour écouter à travers les murs
-
-## ⚡ Quick Start (Minimum Viable)
-
-**Pour tester rapidement sans tout configurer**:
-
-1. Ajouter `DiapasonListeningHandler` au Player
-2. Créer une action Input "Diapason" binding sur T
-3. Assigner les 3 références principales (Diapason, Animator, Camera)
-4. Ajouter `AudioListenable` sur quelques objets
-5. Play et appuyer sur T
-
-**Note**: Sans les AudioClips, le système fonctionne mais sans les sons de respiration et de tap.
-
-## 🐛 Troubleshooting
-
-**Rien ne se passe quand j'appuie sur T**:
-- Vérifier l'action Input existe et est assignée
-- Vérifier que le Player n'est pas dans un autre état qui bloque les inputs
-- Regarder la Console pour des erreurs
-
-**Pas de son lors du tap**:
-- Vérifier que l'objet ciblé a AudioListenable
-- Vérifier le layer de l'objet
-- Vérifier la distance (max 5m par défaut)
-- Vérifier que l'objet a un Collider
-
-**La caméra ne bouge pas**:
-- Vérifier Camera Pan Border Size > 0
-- Vérifier que Player Camera est assigné
-- Bouger le curseur tout au bord de l'écran
-
-## ✨ C'est Prêt!
-
-Le système est entièrement implémenté et prêt à l'emploi. Il suffit de suivre les étapes de configuration manuelle ci-dessus et vous pourrez commencer à tester immédiatement!
diff --git a/Assets/Unheimlich_POC/Scripts/Audio/README.md b/Assets/Unheimlich_POC/Scripts/Audio/README.md
deleted file mode 100644
index 8f031e6b..00000000
--- a/Assets/Unheimlich_POC/Scripts/Audio/README.md
+++ /dev/null
@@ -1,257 +0,0 @@
-# Audio Listening System - Architecture
-
-## Vue d'ensemble
-
-Le système d'écoute permet au joueur d'utiliser un diapason pour "écouter" les objets et découvrir des informations cachées à travers les sons et vibrations procéduraux.
-
-## Structure des Fichiers
-
-### Core Scripts
-
-**AudioListenable.cs**
-- Composant principal pour les objets écoutables
-- Génération audio procédurale basée sur le type de matériau
-- Gestion des vibrations de manette
-- Support pour audio statique custom
-
-**DiapasonListeningHandler.cs**
-- Gestionnaire central du mode écoute
-- Gère l'état de concentration du joueur
-- Contrôle la caméra avec pan et curseur
-- Raycast vers les objets écoutables
-- Atténuation sonore ambiante
-
-**ListeningVignetteEffect.cs**
-- Effet visuel de vignette pour l'état d'écoute
-- S'intègre avec URP Volume system
-- Transition smooth entre états
-
-### Data Scripts
-
-**AudioEmitterData.cs**
-- ScriptableObject pour configurer les types d'émetteurs
-- Paramètres procéduraux (fréquences, harmoniques)
-- Settings de vibration
-- Courbes d'atténuation
-
-### Extended Features
-
-**AudioListenableEvent.cs**
-- Ajoute des événements Unity aux objets écoutables
-- Support pour trigger une seule fois
-- Événements: OnListeningStarted, OnListeningStopped, OnFirstListen
-
-**ThroughWallListener.cs**
-- Permet de détecter des objets derrière un mur
-- Feedback audio différent selon ce qui est détecté
-- Peut highlight des objets importants
-
-**DiapasonDebugger.cs**
-- Outil de debugging pour le système
-- Affiche l'état du système en temps réel
-- Liste tous les objets écoutables
-- Gizmos visuels dans la Scene
-
-### Editor Scripts
-
-**AudioListenableEditor.cs**
-- Custom Inspector pour AudioListenable
-- Boutons Quick Setup par type de matériau
-- Test en Play Mode
-
-**AudioListenableBatchSetup.cs**
-- EditorWindow pour configuration en masse
-- Setup par sélection
-- Setup par nom d'objet
-- Presets automatiques (walls, doors, etc.)
-
-## Architecture
-
-```
-Player
-├── DiapasonListeningHandler (Manager)
-│ ├── Input Handling
-│ ├── State Management (Concentrating/Listening)
-│ ├── Camera Control
-│ └── Raycast Detection
-│
-├── ListeningVignetteEffect (Visual)
-│ └── URP Volume Integration
-│
-└── Audio Source (Player sounds)
-
-Scene Objects
-├── AudioListenable (Core)
-│ ├── Procedural Audio Generation
-│ ├── Vibration System
-│ └── Distance Attenuation
-│
-├── AudioListenableEvent (Optional)
-│ └── UnityEvent Triggers
-│
-└── ThroughWallListener (Optional)
- └── Behind-Wall Detection
-```
-
-## Workflow de Fonctionnement
-
-1. **Activation** (Triangle/Y)
- - DiapasonListeningHandler.StartListeningMode()
- - Désactive les inputs de mouvement
- - Active l'objet diapason
-
-2. **Phase de Concentration**
- - Joue le son de respiration
- - Attend la durée de concentration
- - Prépare le mode écoute
-
-3. **Mode Écoute Actif**
- - Curseur souris visible
- - Camera pan sur les bords
- - Raycast continu vers objets
- - Vignette activée
- - Atténuation audio ambiante
-
-4. **Interaction avec Objet**
- - Clic gauche sur objet écoutable
- - Animation du diapason (Tap trigger)
- - AudioListenable.StartListening()
- - Génération du son procédural
- - Activation des vibrations
-
-5. **Désactivation** (Triangle/Y à nouveau)
- - Arrêt de l'écoute
- - Restauration des inputs
- - Désactivation vignette
- - Restauration audio ambiant
-
-## Types d'Émetteurs
-
-| Type | Fréquence | Usage |
-|------|-----------|-------|
-| Generic | 440 Hz | Objets par défaut |
-| Wall | 200 Hz | Murs, surfaces plates |
-| Wood | 300 Hz | Portes, meubles en bois |
-| Metal | 800 Hz | Objets métalliques |
-| Glass | 1200 Hz | Vitres, cristal |
-| Water | 220 Hz | Eau, liquides |
-| Stone | 250 Hz | Pierre, roche |
-| Mechanical | 500 Hz | Machines, mécanismes |
-| Electrical | 440 Hz | Équipements électriques |
-| Organic | 350 Hz | Matériaux vivants |
-
-## Génération Audio Procédurale
-
-### Algorithme de Base
-
-```csharp
-// Pour chaque sample
-float sample = 0;
-
-// Ajoute les harmoniques
-for (int h = 0; h < harmonicCount; h++)
-{
- float harmFreq = baseFreq * harmonicMultipliers[h];
- float harmAmp = harmonicAmplitudes[h];
- sample += Sin(2π * harmFreq * time) * harmAmp;
-}
-
-// Ajoute le bruit
-sample += (Random() - 0.5) * noiseAmount;
-
-// Applique l'envelope
-sample *= Sin(π * time / duration);
-```
-
-### Caractéristiques par Type
-
-**Metal**: Multiples harmoniques (2.1x, 3.8x, 5.2x) pour son métallique
-**Wood**: Peu d'harmoniques + bruit pour texture
-**Glass**: Harmoniques aiguës (1.5x, 2.7x, 4.2x)
-**Water**: Bruit dominant avec légère oscillation
-**Stone**: Bruit granuleux avec harmonique grave
-
-## Système de Vibrations
-
-### Intensité Basée sur Distance
-
-```csharp
-intensity = Lerp(minIntensity, maxIntensity, 1 - distance/maxDistance)
-```
-
-### Pattern de Vibration
-
-```csharp
-pattern = |Sin(time * frequency)|
-finalIntensity = intensity * pattern
-```
-
-### Contrôles Gamepad
-
-- Utilise `Gamepad.current.SetMotorSpeeds(low, high)`
-- Arrêt automatique à la fin de l'écoute
-- Arrêt au OnDisable du composant
-
-## Intégration avec d'Autres Systèmes
-
-### Input System
-- Utilise PlayerInputManager existant
-- Action "Diapason" ajoutée
-- Compatible avec système de toggle input
-
-### Audio System
-- Un AudioSource sur le joueur pour sons système
-- AudioSource sur chaque AudioListenable
-- Spatial audio 3D
-- Custom attenuation curves
-
-### Camera System
-- Contrôle temporaire de la caméra
-- Pan basé sur viewport position
-- Retour à l'état normal à la sortie
-
-## Performance
-
-### Optimisations
-- Génération audio on-demand (pas de pré-calcul)
-- AudioClips courts (0.5-2s)
-- Un seul objet écouté à la fois
-- Raycast avec LayerMask
-- Pas de Update() quand inactif
-
-### Considérations
-- Génération procédurale légère
-- Vibrations: vérification gamepad chaque frame
-- Distance checks optimisés avec DistanceSqr
-
-## Extension Future
-
-### AudioEmitterData Integration
-Actuellement les presets existent mais ne sont pas utilisés par AudioListenable. Pour les intégrer:
-
-1. Ajouter champ `AudioEmitterData` dans AudioListenable
-2. Loader les paramètres depuis le ScriptableObject
-3. Permettre override des paramètres individuels
-
-### Visualisation Sonore
-- Particle systems pour ondes sonores
-- Shader effects sur objets écoutés
-- Indicateurs visuels pour objets importants
-
-### Audio Avancé
-- Réverbération basée sur l'environnement
-- Occlusion sonore
-- Support multi-canal
-
-## Troubleshooting Courant
-
-**Pas de son**: Vérifier AudioSource, layer, distance
-**Pas de vibration**: Vérifier gamepad connecté
-**Camera ne bouge pas**: Vérifier border size, références camera
-**Input ne répond pas**: Vérifier action assignée dans inputactions
-
-## Références
-
-- Unity Input System: com.unity.inputsystem 1.17.0
-- URP: com.unity.render-pipelines.universal 17.3.0
-- Unity 6000.3 APIs
diff --git a/Assets/Unheimlich_POC/Scripts/Audio/README.md.meta b/Assets/Unheimlich_POC/Scripts/Audio/README.md.meta
deleted file mode 100644
index 0862cd7e..00000000
--- a/Assets/Unheimlich_POC/Scripts/Audio/README.md.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 277628261bc57bc4098a8069501666f9
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/DiapasonListeningHandler.cs b/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/DiapasonListeningHandler.cs
index f50181c7..15da7b21 100644
--- a/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/DiapasonListeningHandler.cs
+++ b/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/DiapasonListeningHandler.cs
@@ -6,15 +6,28 @@ using InputManager = Unheimlich.Managers.PlayerInputManager;
namespace Unheimlich.Gameplay.Player
{
+ ///
+ /// Manages the tuning fork (diapason) listening mechanic.
+ /// Handles:
+ /// - Equipping/unequipping the diapason with tween animations
+ /// - Concentration phase (breathing sound and duration)
+ /// - Listening mode with camera pan control
+ /// - Tapping the diapason on listenable objects
+ /// - Visual feedback (vignette, cursor, particles)
+ /// - Preventing multiple taps on the same emitter
+ ///
public class DiapasonListeningHandler : MonoBehaviour
{
+ // Animator parameter names for diapason animations
+ private const string ANIM_TRIGGER_TAP = "Tap";
+ private const string ANIM_BOOL_VIBRATING = "IsVibrating";
+
public static DiapasonListeningHandler Instance { get; private set; }
[Header("References")]
[SerializeField] private GameObject _diapasonObject;
[SerializeField] private Animator _diapasonAnimator;
[SerializeField] private Camera _playerCamera;
- [SerializeField] private Transform _cursorTransform;
[Header("Listening Settings")]
[SerializeField] private float _listeningRange = 5f;
@@ -35,13 +48,19 @@ namespace Unheimlich.Gameplay.Player
[Header("Visual Feedback")]
[SerializeField] private float _vignetteIntensity = 0.5f;
[SerializeField] private ListeningVignetteEffect _vignetteEffect;
+ [SerializeField] private GameObject _handTouchFeedback;
+ [SerializeField] private ParticleSystem _diapasonParticles;
[Header("Audio")]
[SerializeField] private AudioClip _breathInClip;
[SerializeField] private AudioClip _diapasonTapClip;
+ [SerializeField] [Range(0f, 1f)] private float _diapasonTapVolume = 1f;
[SerializeField] private float _ambientAttenuationAmount = 0.3f;
[SerializeField] private float _audioFadeDuration = 0.5f;
+ [Header("Touch Settings")]
+ [SerializeField] private float _touchDistance = 2f;
+
[Header("Input Action")]
[SerializeField] private InputActionReference _diapasonAction;
[SerializeField] private InputActionReference _lookAction;
@@ -59,10 +78,7 @@ namespace Unheimlich.Gameplay.Player
private float _originalAmbientVolume;
private Vector3 _diapasonEquippedPosition;
private Vector3 _diapasonHiddenPosition;
- private bool _movementDisabled;
-
- private const string ANIM_TRIGGER_TAP = "Tap";
- private const string ANIM_BOOL_EQUIPPED = "IsEquipped";
+ private bool _canUseDiapason;
private void Awake()
{
@@ -80,40 +96,125 @@ namespace Unheimlich.Gameplay.Player
if (_diapasonObject != null)
{
_diapasonEquippedPosition = _diapasonObject.transform.localPosition;
- _diapasonHiddenPosition = _diapasonEquippedPosition + Vector3.up * _diapasonHideOffset;
+ _diapasonHiddenPosition = _diapasonEquippedPosition + Vector3.down * Mathf.Abs(_diapasonHideOffset);
+
+ if (_diapasonAnimator != null)
+ _diapasonAnimator.enabled = false;
+
_diapasonObject.transform.localPosition = _diapasonHiddenPosition;
- _diapasonObject.SetActive(false);
+ }
+
+ if (_diapasonParticles != null)
+ {
+ _diapasonParticles.Stop();
+ var emission = _diapasonParticles.emission;
+ emission.enabled = false;
+ }
+
+ if (_handTouchFeedback != null)
+ {
+ _handTouchFeedback.SetActive(false);
}
if (_diapasonAction == null)
{
Debug.LogError("[Diapason] _diapasonAction is NOT assigned! Please assign it in the Inspector.");
}
- else
- {
- Debug.Log($"[Diapason] _diapasonAction assigned: {_diapasonAction.action.name}");
- }
}
private void Update()
{
+ if (!IsListening && !IsConcentrating)
+ {
+ CheckForNearbyEmitter();
+ }
+
if (_diapasonAction != null && _diapasonAction.action.WasPressedThisFrame())
{
- Debug.Log($"[Diapason] Action pressed! IsListening={IsListening}, IsConcentrating={IsConcentrating}");
- if (!IsListening && !IsConcentrating)
+ if (!IsListening && !IsConcentrating && _canUseDiapason)
+ {
StartListeningMode();
+ }
else if (IsListening || IsConcentrating)
+ {
StopListeningMode();
+ }
}
if (IsListening)
{
UpdateCursorAndCameraPan();
CheckForListenableObject();
- Debug.Log("Listening");
}
}
+ private void CheckForNearbyEmitter()
+ {
+ if (_playerCamera == null)
+ return;
+
+ Ray ray = _playerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f));
+
+ if (Physics.Raycast(ray, out RaycastHit hit, _listeningRange, _listenableLayers))
+ {
+ AudioListenable listenable = hit.collider.GetComponent();
+
+ if (listenable != null)
+ {
+ if (_currentTargetEmitter != listenable)
+ {
+ if (_currentTargetEmitter != null && (IsConcentrating || IsListening))
+ _currentTargetEmitter.SetConcentrating(false);
+
+ _currentTargetEmitter = listenable;
+ }
+
+ float distance = hit.distance;
+ bool isInTouchRange = distance <= _touchDistance;
+
+ if (isInTouchRange && !_canUseDiapason)
+ {
+ _canUseDiapason = true;
+ if (_handTouchFeedback != null)
+ _handTouchFeedback.SetActive(true);
+ }
+ else if (!isInTouchRange && _canUseDiapason)
+ {
+ _canUseDiapason = false;
+ if (_handTouchFeedback != null)
+ _handTouchFeedback.SetActive(false);
+ }
+ }
+ else
+ {
+ if (_currentTargetEmitter != null && (IsConcentrating || IsListening))
+ {
+ _currentTargetEmitter.SetConcentrating(false);
+ _currentTargetEmitter = null;
+ }
+
+ _canUseDiapason = false;
+ if (_handTouchFeedback != null)
+ _handTouchFeedback.SetActive(false);
+ }
+ }
+ else
+ {
+ if (_currentTargetEmitter != null && (IsConcentrating || IsListening))
+ {
+ _currentTargetEmitter.SetConcentrating(false);
+ _currentTargetEmitter = null;
+ }
+
+ _canUseDiapason = false;
+ if (_handTouchFeedback != null)
+ _handTouchFeedback.SetActive(false);
+ }
+ }
+
+ ///
+ /// Initiates the listening mode sequence.
+ ///
private void StartListeningMode()
{
if (_listeningCoroutine != null)
@@ -122,47 +223,64 @@ namespace Unheimlich.Gameplay.Player
_listeningCoroutine = StartCoroutine(ListeningSequence());
}
+ ///
+ /// 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
+ ///
private IEnumerator ListeningSequence()
{
- Debug.Log("[Diapason] ListeningSequence START");
IsConcentrating = true;
- DisablePlayerMovement(true);
+ InputManager.SetContext(InputManager.InputContext.Listening);
+
+ if (_currentTargetEmitter != null)
+ _currentTargetEmitter.SetConcentrating(true);
if (_diapasonObject != null)
{
- _diapasonObject.SetActive(true);
- if (_diapasonAnimator != null)
- _diapasonAnimator.SetBool(ANIM_BOOL_EQUIPPED, true);
-
if (_tweenCoroutine != null)
StopCoroutine(_tweenCoroutine);
- _tweenCoroutine = StartCoroutine(TweenDiapasonPosition(_diapasonEquippedPosition, _diapasonTweenDuration));
+
+ _tweenCoroutine = StartCoroutine(TweenDiapasonPosition(_diapasonEquippedPosition, _diapasonTweenDuration, () =>
+ {
+ if (_diapasonAnimator != null)
+ {
+ _diapasonAnimator.enabled = true;
+ _diapasonAnimator.SetBool(ANIM_BOOL_VIBRATING, false);
+ }
+ }));
}
- Debug.Log($"[Diapason] Playing breath in, waiting {_breathInDuration}s");
PlayBreathIn();
yield return new WaitForSeconds(_breathInDuration);
- Debug.Log($"[Diapason] Concentrating, waiting {_concentrationDuration - _breathInDuration}s");
yield return new WaitForSeconds(_concentrationDuration - _breathInDuration);
- Debug.Log("[Diapason] Setting IsListening = TRUE");
IsConcentrating = false;
IsListening = true;
+ EnableVignette(true);
+
float currentPitch = _playerCamera.transform.localEulerAngles.x;
if (currentPitch > 180f)
currentPitch -= 360f;
_originalCameraRotation = new Vector2(transform.eulerAngles.y, currentPitch);
- AttenuateAmbientSound(true);
- EnableVignette(true);
Cursor.lockState = CursorLockMode.Confined;
Cursor.visible = false;
- Debug.Log("[Diapason] ListeningSequence COMPLETE");
}
+ ///
+ /// Stops the listening mode and returns to normal state:
+ /// - Stops vibration animation
+ /// - Tweens diapason back to hidden position
+ /// - Stops emitter listening
+ /// - Hides vignette and cursor
+ /// - Re-enables player movement
+ ///
private void StopListeningMode()
{
if (_listeningCoroutine != null)
@@ -184,28 +302,46 @@ namespace Unheimlich.Gameplay.Player
if (_diapasonObject != null)
{
if (_diapasonAnimator != null)
- _diapasonAnimator.SetBool(ANIM_BOOL_EQUIPPED, false);
+ {
+ _diapasonAnimator.SetBool(ANIM_BOOL_VIBRATING, false);
+ _diapasonAnimator.enabled = false;
+ }
if (_tweenCoroutine != null)
StopCoroutine(_tweenCoroutine);
- _tweenCoroutine = StartCoroutine(TweenDiapasonPosition(_diapasonHiddenPosition, _diapasonTweenDuration, () => _diapasonObject.SetActive(false)));
+
+ _tweenCoroutine = StartCoroutine(TweenDiapasonPosition(_diapasonHiddenPosition, _diapasonTweenDuration));
+ }
+
+ if (_diapasonParticles != null)
+ {
+ _diapasonParticles.Stop();
+ var emission = _diapasonParticles.emission;
+ emission.enabled = false;
+ }
+
+ if (_handTouchFeedback != null)
+ {
+ _handTouchFeedback.SetActive(false);
}
- AttenuateAmbientSound(false);
EnableVignette(false);
- Cursor.lockState = CursorLockMode.Locked;
- Cursor.visible = false;
-
- DisablePlayerMovement(false);
+ InputManager.SetContext(InputManager.InputContext.Normal);
if (_currentTargetEmitter != null)
{
_currentTargetEmitter.StopListening();
_currentTargetEmitter = null;
}
+
+ _canUseDiapason = false;
}
+ ///
+ /// Updates cursor position and camera panning during listening mode.
+ /// Supports both gamepad (look input) and mouse (screen edges).
+ ///
private void UpdateCursorAndCameraPan()
{
if (_playerCamera == null)
@@ -257,6 +393,10 @@ namespace Unheimlich.Gameplay.Player
_playerCamera.transform.localEulerAngles = cameraRotation;
}
+ ///
+ /// Raycasts from camera center to detect listenable objects.
+ /// Handles tap input and prevents tapping the same emitter multiple times.
+ ///
private void CheckForListenableObject()
{
if (_playerCamera == null)
@@ -266,48 +406,46 @@ namespace Unheimlich.Gameplay.Player
if (Physics.Raycast(ray, out RaycastHit hit, _listeningRange, _listenableLayers))
{
- Debug.Log($"Raycast hit: {hit.collider.gameObject.name}");
AudioListenable listenable = hit.collider.GetComponent();
if (listenable != null)
{
- Debug.Log($"AudioListenable found on {hit.collider.gameObject.name}!");
if (listenable != _currentTargetEmitter)
{
- if (_currentTargetEmitter != null)
+ if (_currentTargetEmitter != null && !_currentTargetEmitter.HasBeenTapped)
_currentTargetEmitter.StopListening();
_currentTargetEmitter = listenable;
- Debug.Log($"_currentTargetEmitter set to {hit.collider.gameObject.name}");
+ }
+
+ bool firePressed = false;
+ if (_fireAction != null && _fireAction.action != null && _fireAction.action.WasPressedThisFrame())
+ {
+ firePressed = true;
+ }
+ else if (Mouse.current != null && Mouse.current.leftButton.wasPressedThisFrame)
+ {
+ firePressed = true;
+ }
+
+ // Only allow tap if emitter hasn't been tapped yet
+ if (firePressed && _currentTargetEmitter != null && !_currentTargetEmitter.HasBeenTapped)
+ {
+ TriggerDiapasonTap();
}
}
else
{
- Debug.LogWarning($"Raycast hit {hit.collider.gameObject.name} but NO AudioListenable found!");
- }
-
- bool firePressed = false;
- if (_fireAction != null && _fireAction.action != null && _fireAction.action.WasPressedThisFrame())
- {
- firePressed = true;
- }
- else if (Mouse.current != null && Mouse.current.leftButton.wasPressedThisFrame)
- {
- firePressed = true;
- }
-
- if (firePressed)
- {
- Debug.Log($"Fire/Click detected! _currentTargetEmitter = {(_currentTargetEmitter != null ? _currentTargetEmitter.gameObject.name : "NULL")}");
- if (_currentTargetEmitter != null)
+ if (_currentTargetEmitter != null && !_currentTargetEmitter.HasBeenTapped)
{
- TriggerDiapasonTap();
+ _currentTargetEmitter.StopListening();
+ _currentTargetEmitter = null;
}
}
}
else
{
- if (_currentTargetEmitter != null)
+ if (_currentTargetEmitter != null && !_currentTargetEmitter.HasBeenTapped)
{
_currentTargetEmitter.StopListening();
_currentTargetEmitter = null;
@@ -315,25 +453,35 @@ namespace Unheimlich.Gameplay.Player
}
}
+ ///
+ /// Triggers the diapason tap action:
+ /// - Plays tap animation and vibration loop
+ /// - Starts listening sequence on the target emitter
+ /// - Plays diapason particles
+ /// - Plays tap sound
+ ///
private void TriggerDiapasonTap()
{
- Debug.Log("[Diapason] TriggerDiapasonTap called!");
-
if (_diapasonAnimator != null)
+ {
_diapasonAnimator.SetTrigger(ANIM_TRIGGER_TAP);
+ _diapasonAnimator.SetBool(ANIM_BOOL_VIBRATING, true);
+ }
if (_diapasonTapClip != null && _playerAudioSource != null)
- _playerAudioSource.PlayOneShot(_diapasonTapClip);
+ _playerAudioSource.PlayOneShot(_diapasonTapClip, _diapasonTapVolume);
+
+ if (_diapasonParticles != null)
+ {
+ var emission = _diapasonParticles.emission;
+ emission.enabled = true;
+ _diapasonParticles.Play();
+ }
if (_currentTargetEmitter != null)
{
- Debug.Log($"[Diapason] Starting listening on {_currentTargetEmitter.gameObject.name}");
_currentTargetEmitter.StartListening(transform.position);
}
- else
- {
- Debug.LogWarning("[Diapason] TriggerDiapasonTap called but _currentTargetEmitter is NULL!");
- }
}
private void PlayBreathIn()
@@ -341,7 +489,7 @@ namespace Unheimlich.Gameplay.Player
if (_breathInClip != null && _playerAudioSource != null)
_playerAudioSource.PlayOneShot(_breathInClip);
}
-
+ #region If needed
private void AttenuateAmbientSound(bool enable)
{
if (_audioFadeCoroutine != null)
@@ -352,6 +500,7 @@ namespace Unheimlich.Gameplay.Player
private IEnumerator FadeAmbientSound(bool fadeOut)
{
+ //To do : Create audio tracks
AudioListener listener = FindFirstObjectByType();
if (listener == null)
yield break;
@@ -375,7 +524,7 @@ namespace Unheimlich.Gameplay.Player
AudioListener.volume = targetVolume;
}
-
+ #endregion
private IEnumerator FadeOutAudio(AudioSource source, float duration)
{
float startVolume = source.volume;
@@ -419,26 +568,6 @@ namespace Unheimlich.Gameplay.Player
onComplete?.Invoke();
}
- private void DisablePlayerMovement(bool disable)
- {
- if (_movementDisabled == disable)
- return;
-
- _movementDisabled = disable;
-
- PlayerMovement playerMovement = GetComponent();
- if (playerMovement != null)
- playerMovement.enabled = !disable;
-
- PlayerLook playerLook = GetComponent();
- if (playerLook != null)
- playerLook.enabled = !disable;
-
- CameraHeadBob headBob = GetComponentInChildren();
- if (headBob != null)
- headBob.enabled = !disable;
- }
-
private void OnDrawGizmosSelected()
{
if (_playerCamera != null && IsListening)
diff --git a/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/HandTouchFeedback.cs b/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/HandTouchFeedback.cs
new file mode 100644
index 00000000..fa14f867
--- /dev/null
+++ b/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/HandTouchFeedback.cs
@@ -0,0 +1,42 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Unheimlich.Gameplay.Player
+{
+ public class HandTouchFeedback : MonoBehaviour
+ {
+ [Header("Visual Settings")]
+ [SerializeField] private Image _feedbackImage;
+ [SerializeField] private Color _readyColor = Color.green;
+ [SerializeField] private float _pulseSpeed = 2f;
+ [SerializeField] private float _pulseIntensity = 0.3f;
+
+ private float _pulseTimer;
+ private Color _originalColor;
+
+ private void Awake()
+ {
+ if (_feedbackImage != null)
+ {
+ _originalColor = _feedbackImage.color;
+ }
+ }
+
+ private void OnEnable()
+ {
+ _pulseTimer = 0f;
+ }
+
+ private void Update()
+ {
+ if (_feedbackImage == null)
+ return;
+
+ _pulseTimer += Time.deltaTime * _pulseSpeed;
+ float pulse = (Mathf.Sin(_pulseTimer) + 1f) * 0.5f;
+
+ Color targetColor = Color.Lerp(_originalColor, _readyColor, pulse * _pulseIntensity);
+ _feedbackImage.color = targetColor;
+ }
+ }
+}
diff --git a/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/HandTouchFeedback.cs.meta b/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/HandTouchFeedback.cs.meta
new file mode 100644
index 00000000..b2a1a788
--- /dev/null
+++ b/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/HandTouchFeedback.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 39b78978d656e894ea455342398ef8ba
\ No newline at end of file
diff --git a/Assets/Unheimlich_POC/Scripts/Managers/PlayerInputManager.cs b/Assets/Unheimlich_POC/Scripts/Managers/PlayerInputManager.cs
index 563b558a..46d6e722 100644
--- a/Assets/Unheimlich_POC/Scripts/Managers/PlayerInputManager.cs
+++ b/Assets/Unheimlich_POC/Scripts/Managers/PlayerInputManager.cs
@@ -1,16 +1,28 @@
using UnityEngine;
using UnityEngine.InputSystem;
+using Unheimlich.Gameplay.Player;
namespace Unheimlich.Managers
{
///
/// Centralizes Input System handling for the player.
/// Manages input state, action references, and global input enable/disable functionality.
+ /// Supports different input contexts (Normal, Dialogue, Listening) to control which inputs are active.
///
[RequireComponent(typeof(PlayerInput))]
public class PlayerInputManager : MonoBehaviour
-{
- public static PlayerInputManager Instance { get; private set; }
+ {
+ ///
+ /// Defines different input contexts that control which player actions are enabled.
+ ///
+ public enum InputContext
+ {
+ Normal, // All inputs enabled (movement, look, jump, interact, diapason)
+ Dialogue, // Only look and interact enabled (for dialogues/UI)
+ Listening // Only look enabled, movement disabled (for diapason camera pan)
+ }
+
+ public static PlayerInputManager Instance { get; private set; }
[Header("Input Values (Read only)")]
public Vector2 MoveInput;
@@ -21,12 +33,17 @@ namespace Unheimlich.Managers
public static bool IsInputEnabled { get; private set; } = true;
public static bool IsLookingEnabled { get; private set; } = true;
+ public static InputContext CurrentContext { get; private set; } = InputContext.Normal;
private InputActionMap _playerActionMap;
private InputAction _lookAction;
private InputAction _interactAction;
private InputAction _diapasonAction;
+ private PlayerMovement _playerMovement;
+ private PlayerLook _playerLook;
+ private CameraHeadBob _headBob;
+
private void Awake()
{
if (Instance != null && Instance != this)
@@ -50,34 +67,76 @@ namespace Unheimlich.Managers
InteractAction.action.Enable();
if (DiapasonAction != null)
DiapasonAction.action.Enable();
+
+ _playerMovement = GetComponent();
+ _playerLook = GetComponent();
+ _headBob = GetComponentInChildren();
+ }
+
+ ///
+ /// Sets the input context, controlling which inputs and player components are active.
+ ///
+ public static void SetContext(InputContext context)
+ {
+ if (Instance == null) return;
+
+ CurrentContext = context;
+
+ switch (context)
+ {
+ case InputContext.Normal:
+ Instance._playerActionMap.Enable();
+ Instance.SetComponentsEnabled(true, true, true);
+ IsInputEnabled = true;
+ IsLookingEnabled = true;
+ Cursor.lockState = CursorLockMode.Locked;
+ Cursor.visible = false;
+ break;
+
+ case InputContext.Dialogue:
+ Instance._playerActionMap.Disable();
+ Instance._lookAction.Enable();
+ Instance._interactAction.Enable();
+ if (Instance._diapasonAction != null)
+ Instance._diapasonAction.Enable();
+ Instance.SetComponentsEnabled(false, false, false);
+ IsInputEnabled = false;
+ IsLookingEnabled = false;
+ break;
+
+ case InputContext.Listening:
+ Instance._playerActionMap.Disable();
+ Instance._lookAction.Enable();
+ if (Instance._diapasonAction != null)
+ Instance._diapasonAction.Enable();
+ Instance.SetComponentsEnabled(false, false, false);
+ IsInputEnabled = false;
+ IsLookingEnabled = false;
+ break;
+ }
+ }
+
+ ///
+ /// Enables or disables player movement components.
+ ///
+ private void SetComponentsEnabled(bool movement, bool look, bool headBob)
+ {
+ if (_playerMovement != null)
+ _playerMovement.enabled = movement;
+ if (_playerLook != null)
+ _playerLook.enabled = look;
+ if (_headBob != null)
+ _headBob.enabled = headBob;
}
///
/// Globally toggles player input on/off. When disabled, only look and interact actions remain active.
/// Used during dialogues, inspections, or UI interactions.
+ /// LEGACY: Use SetContext(InputContext.Dialogue) instead.
///
public static void ToggleInput(bool enable)
{
- if (Instance == null) return;
-
- IsInputEnabled = enable;
-
- if (enable)
- {
- IsLookingEnabled = true;
- Instance._playerActionMap.Enable();
- Cursor.lockState = CursorLockMode.Locked;
- Cursor.visible = false;
- }
- else
- {
- Instance._playerActionMap.Disable();
- Instance._lookAction.Enable();
- Instance._interactAction.Enable();
- if (Instance._diapasonAction != null)
- Instance._diapasonAction.Enable();
- IsLookingEnabled = false;
- }
+ SetContext(enable ? InputContext.Normal : InputContext.Dialogue);
}
public void OnMove(InputAction.CallbackContext context)