From 5f5f43b3cf308a9f7c41f415da338411f0d55013 Mon Sep 17 00:00:00 2001 From: nothke Date: Tue, 20 Aug 2024 01:12:54 +0200 Subject: [PATCH] Added collision sounds --- Assets/Audio/hits_metallic.asset | 16 + Assets/Audio/hits_metallic.asset.meta | 8 + Assets/Prefabs/Products/Basic Torus.prefab | 19 + Assets/Prefabs/sliding_crane.prefab | 8 +- Assets/Scenes/test_collision_sounds.unity | 1441 +++++++++++++++++ .../Scenes/test_collision_sounds.unity.meta | 7 + Assets/Scripts/Utils/CollisionSounds.cs | 84 + Assets/Scripts/Utils/CollisionSounds.cs.meta | 11 + .../Scripts/Utils/CollisionSoundsProfile.cs | 13 + .../Utils/CollisionSoundsProfile.cs.meta | 11 + 10 files changed, 1616 insertions(+), 2 deletions(-) create mode 100644 Assets/Audio/hits_metallic.asset create mode 100644 Assets/Audio/hits_metallic.asset.meta create mode 100644 Assets/Scenes/test_collision_sounds.unity create mode 100644 Assets/Scenes/test_collision_sounds.unity.meta create mode 100644 Assets/Scripts/Utils/CollisionSounds.cs create mode 100644 Assets/Scripts/Utils/CollisionSounds.cs.meta create mode 100644 Assets/Scripts/Utils/CollisionSoundsProfile.cs create mode 100644 Assets/Scripts/Utils/CollisionSoundsProfile.cs.meta diff --git a/Assets/Audio/hits_metallic.asset b/Assets/Audio/hits_metallic.asset new file mode 100644 index 0000000..7e30075 --- /dev/null +++ b/Assets/Audio/hits_metallic.asset @@ -0,0 +1,16 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f998237f81278234b950080600e80b74, type: 3} + m_Name: hits_metallic + m_EditorClassIdentifier: + clips: + - {fileID: 8300000, guid: 8f2502b0ea356614faad568cc2ce8d28, type: 3} diff --git a/Assets/Audio/hits_metallic.asset.meta b/Assets/Audio/hits_metallic.asset.meta new file mode 100644 index 0000000..8d2ff89 --- /dev/null +++ b/Assets/Audio/hits_metallic.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1c204304ac4bfa44099474b89b8c2616 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Products/Basic Torus.prefab b/Assets/Prefabs/Products/Basic Torus.prefab index 5f4cc1d..3716121 100644 --- a/Assets/Prefabs/Products/Basic Torus.prefab +++ b/Assets/Prefabs/Products/Basic Torus.prefab @@ -67,6 +67,7 @@ GameObject: - component: {fileID: 5301951847822309914} - component: {fileID: 7933676651548381010} - component: {fileID: -6581473434499358903} + - component: {fileID: 4959685768444209079} m_Layer: 0 m_Name: Basic Torus m_TagString: Untagged @@ -162,6 +163,24 @@ MonoBehaviour: name: rb: {fileID: 0} rotateAroundPoint: 0 +--- !u!114 &4959685768444209079 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7947812480369148219} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 075e36d3d3303934bac79dda1017c56c, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 11400000, guid: 1c204304ac4bfa44099474b89b8c2616, type: 2} + volumeVelocityMult: 0.05 + timeout: 0.05 + pitchMult: 1 + preventDoubleSound: 0 + mixerGroup: {fileID: 0} --- !u!1 &8478189424890482192 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/sliding_crane.prefab b/Assets/Prefabs/sliding_crane.prefab index f14124d..114535b 100644 --- a/Assets/Prefabs/sliding_crane.prefab +++ b/Assets/Prefabs/sliding_crane.prefab @@ -226,7 +226,7 @@ Transform: m_GameObject: {fileID: 4060506572131258815} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 20.26, y: 0, z: 28.17} + m_LocalPosition: {x: 20.25, y: -0.07000017, z: 28.25} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -1062,6 +1062,10 @@ PrefabInstance: propertyPath: m_Name value: crane_magent objectReference: {fileID: 0} + - target: {fileID: 3485108705020879377, guid: 146ff579bcab1a343bdcbf24e8b5e462, type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} - target: {fileID: 5436501012833944904, guid: 146ff579bcab1a343bdcbf24e8b5e462, type: 3} propertyPath: m_LocalPosition.x value: 0 @@ -1150,7 +1154,7 @@ Rigidbody: serializedVersion: 4 m_Mass: 50 m_Drag: 1 - m_AngularDrag: 0.05 + m_AngularDrag: 10 m_CenterOfMass: {x: 0, y: 0, z: 0} m_InertiaTensor: {x: 1, y: 1, z: 1} m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} diff --git a/Assets/Scenes/test_collision_sounds.unity b/Assets/Scenes/test_collision_sounds.unity new file mode 100644 index 0000000..1fb8fe4 --- /dev/null +++ b/Assets/Scenes/test_collision_sounds.unity @@ -0,0 +1,1441 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &163199203 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7947812480369148219, guid: b83fa12312697144992b762dc5084341, type: 3} + m_PrefabInstance: {fileID: 615224301} + m_PrefabAsset: {fileID: 0} +--- !u!114 &163199208 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 163199203} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 075e36d3d3303934bac79dda1017c56c, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 11400000, guid: 1c204304ac4bfa44099474b89b8c2616, type: 2} + volumeVelocityMult: 0.05 + timeout: 0.05 + pitchMult: 1 + preventDoubleSound: 0 + mixerGroup: {fileID: 0} +--- !u!1 &383640985 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 383640987} + - component: {fileID: 383640986} + m_Layer: 0 + m_Name: Player + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &383640986 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 383640985} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 461cd396e3fc7cc4eb9c92bde05c1b9a, type: 3} + m_Name: + m_EditorClassIdentifier: + Character: {fileID: 1834870093} + CharacterCamera: {fileID: 1601824120} +--- !u!4 &383640987 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 383640985} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071065, z: -0, w: 0.7071072} + m_LocalPosition: {x: -8.896634, y: 0.32860655, z: 5.236394} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1051567788} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1001 &444461845 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 307974221925563946, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_ProvidesContacts + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.x + value: -2.89 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.y + value: 2.86 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.z + value: 4.41 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7756924 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.x + value: -0.6311112 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -78.264 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7947812480369148219, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_Name + value: Basic Torus (3) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} +--- !u!1 &539769830 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 539769831} + - component: {fileID: 539769833} + - component: {fileID: 539769832} + m_Layer: 0 + m_Name: hand_right (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &539769831 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 539769830} + serializedVersion: 2 + m_LocalRotation: {x: -0.5059682, y: 0.48808333, z: 0.49375504, w: 0.5118367} + m_LocalPosition: {x: 0.065, y: 0.002, z: -0.206} + m_LocalScale: {x: 0.17999998, y: 0.18, z: 0.018000007} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 969068470} + m_LocalEulerAnglesHint: {x: -89.339, y: -0.049, z: 87.988} +--- !u!23 &539769832 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 539769830} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -2894856913260010252, guid: bdea37ec281a49c45ae34b3c72e5c08d, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &539769833 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 539769830} + m_Mesh: {fileID: -5163259039384273826, guid: bdea37ec281a49c45ae34b3c72e5c08d, type: 3} +--- !u!1001 &615224301 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.x + value: -4.9637194 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.y + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.z + value: 4.4700975 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.w + value: 0.91428316 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.x + value: -0.2888507 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.y + value: 0.14539504 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.z + value: 0.24395047 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -36.807 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 8.977 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 26.887 + objectReference: {fileID: 0} + - target: {fileID: 7947812480369148219, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_Name + value: Boxed Torus (3) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 7947812480369148219, guid: b83fa12312697144992b762dc5084341, type: 3} + insertIndex: -1 + addedObject: {fileID: 163199208} + m_SourcePrefab: {fileID: 100100000, guid: b83fa12312697144992b762dc5084341, type: 3} +--- !u!1 &687919022 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 687919023} + - component: {fileID: 687919029} + - component: {fileID: 687919028} + - component: {fileID: 687919027} + - component: {fileID: 687919026} + - component: {fileID: 687919025} + - component: {fileID: 687919024} + - component: {fileID: 687919030} + m_Layer: 0 + m_Name: Interaction + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &687919023 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687919022} + serializedVersion: 2 + 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: + - {fileID: 969068470} + m_Father: {fileID: 1601824119} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &687919024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687919022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a5fc4a4111f27864b8128645cf6c82b6, type: 3} + m_Name: + m_EditorClassIdentifier: + springRate: 5 + softClampAngle: 50 +--- !u!114 &687919025 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687919022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81363621df3548e45ba871e78efd9d68, type: 3} + m_Name: + m_EditorClassIdentifier: + centerText: {fileID: 0} +--- !u!114 &687919026 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687919022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e26630301387ce5469cfa0fb478b201b, type: 3} + m_Name: + m_EditorClassIdentifier: + k_Spring: 100 + k_Damper: 10 + k_Drag: 0 + k_AngularDrag: 0 + k_Distance: 0.0001 + k_AttachToCenterOfMass: 0 + distanceLimit: 5 + clampVelocity: 2 + clampExitVelocity: 2 + fakeMass: 0.2 +--- !u!114 &687919027 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687919022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ff7c610785ea24144a1af4b97eb2ba39, type: 3} + m_Name: + m_EditorClassIdentifier: + hand: {fileID: 969068470} + handAimPos: {x: 0, y: 0, z: 0.8} + examinationMouseSensitivity: 1 + smoothTake: 1 + smoothMoveFactor: 0.1 + smoothRotateRate: 10 + throwFromCenter: 1 + throwUpFactor: 0.2 + throwAngularVelocity: 10 + throwTransform: {fileID: 0} + handNoiseGain: 1 + lockableFreeLookComponent: {fileID: 0} + focusEffectComponent: {fileID: 0} + nicePlacement: 0 + disableShadowsOnTakenObjects: 1 +--- !u!114 &687919028 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687919022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb45815bc5df925448fc604ec327964b, type: 3} + m_Name: + m_EditorClassIdentifier: + interactDistance: 2 + rayModeToggling: 0 + mouseRay: 0 + lockableFreeLookComponent: {fileID: 0} + handsComponent: {fileID: 0} + raycastLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + startScreenPosition: {x: 0, y: 0, z: 0} + debug: 0 +--- !u!114 &687919029 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687919022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b8ad317191c930345bb55655eac9a932, type: 3} + m_Name: + m_EditorClassIdentifier: + controller: {fileID: 687919028} + hands: {fileID: 687919027} + interactMouseButton: 0 + rayModeChangeMouseButton: 1 + dropKey: 113 + throwKey: 102 + examineKey: 101 + placeKey: 116 +--- !u!114 &687919030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687919022} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bb13478e4c42bd7489db482354f8b915, type: 3} + m_Name: + m_EditorClassIdentifier: + hands: {fileID: 687919027} + items: + - {fileID: 0} +--- !u!1001 &858624848 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 307974221925563946, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_ProvidesContacts + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.x + value: -2.89 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.y + value: 1.85 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.z + value: 4.41 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7756924 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.x + value: -0.6311112 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -78.264 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7947812480369148219, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_Name + value: Basic Torus (2) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} +--- !u!1 &969068469 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 969068470} + m_Layer: 0 + m_Name: Hands + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &969068470 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 969068469} + serializedVersion: 2 + m_LocalRotation: {x: 0.0057716966, y: -0.004608993, z: -0.0000215645, w: -0.99997276} + m_LocalPosition: {x: 0.23, y: -0.45, z: 0.65} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 539769831} + m_Father: {fileID: 687919023} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &996656353 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.x + value: -4.9637194 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.y + value: 2.65 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.z + value: 4.4700975 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7947812480369148219, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_Name + value: Boxed Torus (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b83fa12312697144992b762dc5084341, type: 3} +--- !u!1 &1051567787 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1051567788} + m_Layer: 0 + m_Name: Player + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1051567788 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1051567787} + serializedVersion: 2 + 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: + - {fileID: 383640987} + - {fileID: 1601824119} + - {fileID: 1834870095} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1228306005 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1228306006} + m_Layer: 0 + m_Name: Level + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1228306006 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1228306005} + serializedVersion: 2 + 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: + - {fileID: 1325749538} + - {fileID: 1409510905} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1320974403 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.x + value: -4.9637194 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.y + value: 1.93 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.z + value: 4.4700975 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7947812480369148219, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_Name + value: Boxed Torus (2) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b83fa12312697144992b762dc5084341, type: 3} +--- !u!1 &1325749534 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1325749538} + - component: {fileID: 1325749537} + - component: {fileID: 1325749536} + - component: {fileID: 1325749535} + - component: {fileID: 1325749539} + m_Layer: 0 + m_Name: Floor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1325749535 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1325749534} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1325749536 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1325749534} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 446234516a3ad9f4688247a490462c6e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1325749537 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1325749534} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1325749538 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1325749534} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.125, z: 0} + m_LocalScale: {x: 100, y: 1, z: 100} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1228306006} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1325749539 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1325749534} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: af3e57595c24e7b4dbb6f7f44db23525, type: 3} + m_Name: + m_EditorClassIdentifier: + Size: + x: 400 + y: 4 + z: 400 + CenterOffset: + x: 0 + y: -0.125 + z: 0 + cachedSize: + x: 400 + y: 4 + z: 400 + cachedOffset: + x: 0 + y: -0.125 + z: 0 +--- !u!1 &1409510904 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1409510905} + - component: {fileID: 1409510906} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1409510905 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1409510904} + serializedVersion: 2 + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1228306006} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!108 &1409510906 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1409510904} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1001 &1435082689 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1051567788} + m_Modifications: + - target: {fileID: 1398904762131290, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_Name + value: ExampleCharacter + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalPosition.x + value: -1.8480377 + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalPosition.y + value: 0.6000003 + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalPosition.z + value: 6.9143667 + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0000004768371 + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114565867274256808, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: JumpUpSpeed + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 114565867274256808, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: MaxAirMoveSpeed + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 114565867274256808, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: AirAccelerationSpeed + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 114565867274256808, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: JumpScalableForwardSpeed + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 2043832388373371775, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d295472d4ce25404e9aed2627c34801f, type: 3} +--- !u!1001 &1468504186 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 307974221925563946, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_ProvidesContacts + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.x + value: -2.89 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.y + value: 12.29 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.z + value: 4.41 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7756924 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.x + value: -0.6311112 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -78.264 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7947812480369148219, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_Name + value: Basic Torus + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} +--- !u!1001 &1601824118 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1051567788} + m_Modifications: + - target: {fileID: 1937979026721672, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_Name + value: ExampleCamera + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalPosition.x + value: -1.1813087 + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalPosition.y + value: 4.48 + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalPosition.z + value: 1.5695577 + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071072 + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalRotation.y + value: 0.7071065 + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114014416615829144, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: MaxDistance + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114014416615829144, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + propertyPath: DefaultDistance + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + insertIndex: -1 + addedObject: {fileID: 687919023} + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c75e91cf060bbf04e89204fa400606df, type: 3} +--- !u!4 &1601824119 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + m_PrefabInstance: {fileID: 1601824118} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1601824120 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 114014416615829144, guid: c75e91cf060bbf04e89204fa400606df, type: 3} + m_PrefabInstance: {fileID: 1601824118} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 24092a40b02616e479baeb940325e339, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1834870093 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 114565867274256808, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + m_PrefabInstance: {fileID: 1435082689} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76020eee813ed7844bcea94c5d5ce76a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1834870095 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4898694727102280, guid: d295472d4ce25404e9aed2627c34801f, type: 3} + m_PrefabInstance: {fileID: 1435082689} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1903622619 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.x + value: -4.9637194 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.y + value: 0.71 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalPosition.z + value: 4.4700975 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7947812480369148219, guid: b83fa12312697144992b762dc5084341, type: 3} + propertyPath: m_Name + value: Boxed Torus + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b83fa12312697144992b762dc5084341, type: 3} +--- !u!1001 &1959666662 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 307974221925563946, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_ProvidesContacts + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.x + value: -2.89 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.y + value: 1.12 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalPosition.z + value: 4.41 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7756924 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.x + value: -0.6311112 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -78.264 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6297052809674953331, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7947812480369148219, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} + propertyPath: m_Name + value: Basic Torus (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d5cbaa49bd379dc49b90d9c38f02bf80, type: 3} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1051567788} + - {fileID: 1228306006} + - {fileID: 1468504186} + - {fileID: 1959666662} + - {fileID: 858624848} + - {fileID: 444461845} + - {fileID: 1903622619} + - {fileID: 996656353} + - {fileID: 1320974403} + - {fileID: 615224301} diff --git a/Assets/Scenes/test_collision_sounds.unity.meta b/Assets/Scenes/test_collision_sounds.unity.meta new file mode 100644 index 0000000..9b92d50 --- /dev/null +++ b/Assets/Scenes/test_collision_sounds.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 85c191ec3cd67d6409ad30dde498cb96 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Utils/CollisionSounds.cs b/Assets/Scripts/Utils/CollisionSounds.cs new file mode 100644 index 0000000..b163073 --- /dev/null +++ b/Assets/Scripts/Utils/CollisionSounds.cs @@ -0,0 +1,84 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.Audio; + +namespace Nothke.Audio +{ + public class CollisionSounds : MonoBehaviour + { + const float RELATIVE_VELOCITY_TRESHOLD = 0.1f; + + // impulse based, currently unused: + //const float IMPULSE_VOLUME_MULT = 0.00001f; + //const float IMPULSE_THRESHOLD = 1; + + public CollisionSoundsProfile profile; + + public float volumeVelocityMult = 0.05f; + public float timeout = 0.05f; + public float pitchMult = 1; + float lastTime; + + public bool preventDoubleSound; + + public AudioMixerGroup mixerGroup; + +#if UNITY_EDITOR + private void Start() + { + if (!profile) + Debug.LogError("No collision sounds profile assigned", this); + } +#endif + + public void ResetTimeout() + { + lastTime = Time.time; + } + + void OnCollisionEnter(Collision collision) + { + if (!enabled) + return; + + // Prevent sound in the first second + float time = Time.time; + if (time < 1) + return; + + if (timeout > 0) + { + if (time - lastTime < timeout) + return; + + lastTime = time; + } + + if (preventDoubleSound) + { + var colSound = collision.collider.GetComponent(); + + if (colSound) + colSound.ResetTimeout(); + } + + //float impulse = (collision.impulse / Time.fixedDeltaTime).magnitude; + //Debug.Log("Impulse: " + impulse); + + //if (impulse < IMPULSE_THRESHOLD) return; + + var relVel = collision.relativeVelocity.magnitude; + + if (relVel < RELATIVE_VELOCITY_TRESHOLD) + return; + + Debug.Assert(profile, "No collision sounds profile assigned", this); + + // TODO: Move parameters to AudioManager: + profile.clips.Play(collision.GetContact(0).point, + volume: relVel * volumeVelocityMult, + pitch: Random.Range(0.95f, 1.05f) * pitchMult, + minDistance: 10, mixerGroup: mixerGroup); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Utils/CollisionSounds.cs.meta b/Assets/Scripts/Utils/CollisionSounds.cs.meta new file mode 100644 index 0000000..87560f8 --- /dev/null +++ b/Assets/Scripts/Utils/CollisionSounds.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 075e36d3d3303934bac79dda1017c56c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Utils/CollisionSoundsProfile.cs b/Assets/Scripts/Utils/CollisionSoundsProfile.cs new file mode 100644 index 0000000..40341fd --- /dev/null +++ b/Assets/Scripts/Utils/CollisionSoundsProfile.cs @@ -0,0 +1,13 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Nothke.Audio +{ + [CreateAssetMenu(menuName = "CollisionSoundsProfile", fileName = "CollisionSoundsProfile")] + public class CollisionSoundsProfile : ScriptableObject + { + public AudioClip[] clips; + } +} + diff --git a/Assets/Scripts/Utils/CollisionSoundsProfile.cs.meta b/Assets/Scripts/Utils/CollisionSoundsProfile.cs.meta new file mode 100644 index 0000000..4fd0742 --- /dev/null +++ b/Assets/Scripts/Utils/CollisionSoundsProfile.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f998237f81278234b950080600e80b74 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: