diff --git a/Assets/AssetCaches.asset b/Assets/AssetCaches.asset index 86a16a753..3394021fd 100644 --- a/Assets/AssetCaches.asset +++ b/Assets/AssetCaches.asset @@ -19348,6 +19348,36 @@ MonoBehaviour: - {fileID: 102900000, guid: aa3f5467c0c153642ac320466aee0ec1, type: 3} FilterEnum: 0 Filter: '*' + - Path: Assets/ResRaw/Prefabs/Player/Line/fishing line float set.prefab + Address: Plyaer/fishing line float set + Type: GameObject + Bundle: main/plyaer.bundle + Tags: + Group: + Name: Plyaer + Enable: 1 + BundleMode: 0 + AddressMode: 2 + Tags: + Collectors: + - {fileID: 102900000, guid: aa3f5467c0c153642ac320466aee0ec1, type: 3} + FilterEnum: 0 + Filter: '*' + - Path: Assets/ResRaw/Prefabs/Player/Line/fishing line spinning.prefab + Address: Plyaer/fishing line spinning + Type: GameObject + Bundle: main/plyaer.bundle + Tags: + Group: + Name: Plyaer + Enable: 1 + BundleMode: 0 + AddressMode: 2 + Tags: + Collectors: + - {fileID: 102900000, guid: aa3f5467c0c153642ac320466aee0ec1, type: 3} + FilterEnum: 0 + Filter: '*' - Path: Assets/ResRaw/Prefabs/Player/male.prefab Address: Plyaer/male Type: GameObject diff --git a/Assets/Scripts/ThirdParty/PhysicsTools.meta b/Assets/GameObject.meta similarity index 77% rename from Assets/Scripts/ThirdParty/PhysicsTools.meta rename to Assets/GameObject.meta index 58c1e59c0..f180a7475 100644 --- a/Assets/Scripts/ThirdParty/PhysicsTools.meta +++ b/Assets/GameObject.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8ce6ddcc06025e84c8f118c9af703263 +guid: ac3eba5473275214c9b475a4fd8eee6f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/ThirdParty/Rope/Core.meta b/Assets/ResRaw/Prefabs/Player/Line.meta similarity index 77% rename from Assets/Scripts/ThirdParty/Rope/Core.meta rename to Assets/ResRaw/Prefabs/Player/Line.meta index aa5e8f400..cc1876744 100644 --- a/Assets/Scripts/ThirdParty/Rope/Core.meta +++ b/Assets/ResRaw/Prefabs/Player/Line.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4894eb7559b3e1043bf7580ed860fd68 +guid: fa2360ddd2ee53b4ba485a57ed889b14 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/ResRaw/Prefabs/Player/Line/fishing line float set.prefab b/Assets/ResRaw/Prefabs/Player/Line/fishing line float set.prefab new file mode 100644 index 000000000..b77cf4a4e --- /dev/null +++ b/Assets/ResRaw/Prefabs/Player/Line/fishing line float set.prefab @@ -0,0 +1,1049 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1017528709445045 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4439867113915692} + - component: {fileID: 114612983243751934} + - component: {fileID: 23649574223012002} + - component: {fileID: 33934948971999448} + - component: {fileID: 114265716934294554} + - component: {fileID: 114148468497635697} + - component: {fileID: 114671520904232594} + - component: {fileID: 114172005767509640} + - component: {fileID: 114941649757569269} + - component: {fileID: 114581403422500557} + m_Layer: 0 + m_Name: Fishing Line + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4439867113915692 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + 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: [] + m_Father: {fileID: 4283454774123242} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114612983243751934 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} + m_Name: + m_EditorClassIdentifier: + solverIndices: + serializedContents: + m_AlignBytes: 16 + groupID: 0 + m_CollisionMaterial: {fileID: 0} + m_SurfaceCollisions: 0 + m_MassScale: 1 + m_SelfCollisions: 0 + restLength_: 0 + elements: [] + _aerodynamicsEnabled: 1 + _drag: 0.05 + _lift: 0.02 + m_RopeBlueprint: {fileID: 0} + tearingEnabled: 0 + tearResistanceMultiplier: 1000 + tearRate: 1 + _distanceConstraintsEnabled: 1 + _stretchingScale: 1 + _stretchCompliance: 0 + _maxCompression: 0 + _bendConstraintsEnabled: 1 + _bendCompliance: 0 + _maxBending: 0.025 + _plasticYield: 0 + _plasticCreep: 0 +--- !u!23 &23649574223012002 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4be07647ecdb4b845a9e0fbc74bb0e0a, 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: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &33934948971999448 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + m_Mesh: {fileID: 0} +--- !u!114 &114265716934294554 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} + m_Name: + m_EditorClassIdentifier: + decimation: 0 + smoothing: 3 + twist: 25 + indexInSystem: 0 +--- !u!114 &114148468497635697 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} + m_Name: + m_EditorClassIdentifier: + material: {fileID: 0} + renderParameters: + layer: 0 + lightProbeUsage: 1 + reflectionProbeUsage: 1 + shadowCastingMode: 1 + receiveShadows: 1 + motionVectors: 0 + renderingLayerMask: 4294967295 + uvAnchor: 0 + uvScale: {x: 1, y: 1} + normalizeV: 1 + section: {fileID: 0} + thicknessScale: 0.8 +--- !u!114 &114671520904232594 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actor: {fileID: 114612983243751934} + m_Target: {fileID: 0} + m_ParticleGroup: {fileID: 0} + m_AttachmentType: 0 + m_ConstrainOrientation: 0 + m_Projection: 0 + m_Compliance: 0 + breakThreshold: Infinity +--- !u!114 &114172005767509640 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actor: {fileID: 114612983243751934} + m_Target: {fileID: 0} + m_ParticleGroup: {fileID: 0} + m_AttachmentType: 0 + m_ConstrainOrientation: 0 + m_Projection: 0 + m_Compliance: 0 + breakThreshold: Infinity +--- !u!114 &114941649757569269 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8285ac97113f74d449053378d0e3a56b, type: 3} + m_Name: + m_EditorClassIdentifier: + m_CursorMu: 0 + m_SourceMu: 0 + direction: 1 +--- !u!114 &114581403422500557 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017528709445045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98ba9d435a0e49c9bb527c34cc91894d, type: 3} + m_Name: + m_EditorClassIdentifier: + rope: {fileID: 114612983243751934} + cursor: {fileID: 114941649757569269} + percentageElasticity: 1 +--- !u!1 &1035052809208993 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4026445325167852} + - component: {fileID: 54679398375713381} + - component: {fileID: 153611279189314279} + - component: {fileID: 135844594273256032} + m_Layer: 7 + m_Name: Lure + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4026445325167852 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1035052809208993} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -1.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4283454774123242} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!54 &54679398375713381 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1035052809208993} + serializedVersion: 5 + m_Mass: 0.01 + m_LinearDamping: 1 + m_AngularDamping: 0.1 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 0.001, y: 0.001, z: 0.001} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 0 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 2 +--- !u!153 &153611279189314279 +ConfigurableJoint: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1035052809208993} + serializedVersion: 4 + m_ConnectedBody: {fileID: 54298866000586118} + m_ConnectedArticulationBody: {fileID: 0} + m_Anchor: {x: 0, y: 0, z: 0} + m_Axis: {x: 0, y: 0, z: 0} + m_AutoConfigureConnectedAnchor: 0 + m_ConnectedAnchor: {x: 0, y: 0, z: 0} + m_SecondaryAxis: {x: 0, y: 0, z: 0} + m_XMotion: 1 + m_YMotion: 1 + m_ZMotion: 1 + m_AngularXMotion: 2 + m_AngularYMotion: 2 + m_AngularZMotion: 2 + m_LinearLimitSpring: + spring: 0 + damper: 0 + m_LinearLimit: + limit: 0.5 + bounciness: 0 + contactDistance: 0 + m_AngularXLimitSpring: + spring: 0 + damper: 0 + m_LowAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_HighAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularYZLimitSpring: + spring: 0 + damper: 0 + m_AngularYLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularZLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_TargetPosition: {x: 0, y: 0, z: 0} + m_TargetVelocity: {x: 0, y: 0, z: 0} + m_XDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_YDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_TargetRotation: {x: 0, y: 0, z: 0, w: 1} + m_TargetAngularVelocity: {x: 0, y: 0, z: 0} + m_RotationDriveMode: 0 + m_AngularXDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_AngularYZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_SlerpDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ProjectionMode: 1 + m_ProjectionDistance: 0.1 + m_ProjectionAngle: 0 + m_ConfiguredInWorldSpace: 0 + m_SwapBodies: 0 + m_BreakForce: Infinity + m_BreakTorque: Infinity + m_EnableCollision: 0 + m_EnablePreprocessing: 0 + m_MassScale: 1 + m_ConnectedMassScale: 1 +--- !u!135 &135844594273256032 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1035052809208993} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Radius: 5.19 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &1387836627839849 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4283454774123242} + - component: {fileID: 114112904742580403} + m_Layer: 0 + m_Name: fishing line float set + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4283454774123242 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1387836627839849} + 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: 4507755321481054} + - {fileID: 4439867113915692} + - {fileID: 4110509859352936} + - {fileID: 4026445325167852} + - {fileID: 4530253318796540} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114112904742580403 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1387836627839849} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c0403ffd74ce46fab8bd4ef057e51432, type: 3} + m_Name: + m_EditorClassIdentifier: + startParticleAttachment: {fileID: 114671520904232594} + isLureConnect: 0 + rodLine: {fileID: 4922671409596527468} + fishingRope: {fileID: 114581403422500557} + LineLength: 0.5 +--- !u!1 &1858052053854210 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4530253318796540} + - component: {fileID: 54298866000586118} + - component: {fileID: 153691655494134957} + m_Layer: 16 + m_Name: Float + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4530253318796540 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1858052053854210} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4283454774123242} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!54 &54298866000586118 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1858052053854210} + serializedVersion: 5 + m_Mass: 0.1 + m_LinearDamping: 1 + m_AngularDamping: 0.1 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 0.001, y: 0.001, z: 0.001} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 0 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 2 +--- !u!153 &153691655494134957 +ConfigurableJoint: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1858052053854210} + serializedVersion: 4 + m_ConnectedBody: {fileID: 0} + m_ConnectedArticulationBody: {fileID: 0} + m_Anchor: {x: 0, y: -0.01, z: 0} + m_Axis: {x: 0, y: 0, z: 0} + m_AutoConfigureConnectedAnchor: 0 + m_ConnectedAnchor: {x: 0, y: 0, z: 0} + m_SecondaryAxis: {x: 0, y: 0, z: 0} + m_XMotion: 1 + m_YMotion: 1 + m_ZMotion: 1 + m_AngularXMotion: 2 + m_AngularYMotion: 2 + m_AngularZMotion: 2 + m_LinearLimitSpring: + spring: 0 + damper: 0 + m_LinearLimit: + limit: 0.5 + bounciness: 0 + contactDistance: 0 + m_AngularXLimitSpring: + spring: 0 + damper: 0 + m_LowAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_HighAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularYZLimitSpring: + spring: 0 + damper: 0 + m_AngularYLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularZLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_TargetPosition: {x: 0, y: 0, z: 0} + m_TargetVelocity: {x: 0, y: 0, z: 0} + m_XDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_YDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_TargetRotation: {x: 0, y: 0, z: 0, w: 1} + m_TargetAngularVelocity: {x: 0, y: 0, z: 0} + m_RotationDriveMode: 0 + m_AngularXDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_AngularYZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_SlerpDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ProjectionMode: 1 + m_ProjectionDistance: 0 + m_ProjectionAngle: 0 + m_ConfiguredInWorldSpace: 0 + m_SwapBodies: 0 + m_BreakForce: Infinity + m_BreakTorque: Infinity + m_EnableCollision: 0 + m_EnablePreprocessing: 0 + m_MassScale: 1 + m_ConnectedMassScale: 1 +--- !u!1 &1933124697579601 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4110509859352936} + - component: {fileID: 114941221864603208} + - component: {fileID: 23047835326758575} + - component: {fileID: 33644460670467264} + - component: {fileID: 114075091806130127} + - component: {fileID: 114972033155067211} + - component: {fileID: 114977355817525795} + - component: {fileID: 114623075352630189} + - component: {fileID: 114422070939195681} + - component: {fileID: 114504105083509877} + m_Layer: 0 + m_Name: Float Line + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4110509859352936 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4283454774123242} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114941221864603208 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} + m_Name: + m_EditorClassIdentifier: + solverIndices: + serializedContents: + m_AlignBytes: 16 + groupID: 0 + m_CollisionMaterial: {fileID: 0} + m_SurfaceCollisions: 0 + m_MassScale: 1 + m_SelfCollisions: 0 + restLength_: 0 + elements: [] + _aerodynamicsEnabled: 1 + _drag: 0.05 + _lift: 0.02 + m_RopeBlueprint: {fileID: 0} + tearingEnabled: 0 + tearResistanceMultiplier: 1000 + tearRate: 1 + _distanceConstraintsEnabled: 1 + _stretchingScale: 1 + _stretchCompliance: 0 + _maxCompression: 0 + _bendConstraintsEnabled: 1 + _bendCompliance: 0 + _maxBending: 0.025 + _plasticYield: 0 + _plasticCreep: 0 +--- !u!23 &23047835326758575 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4be07647ecdb4b845a9e0fbc74bb0e0a, 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: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &33644460670467264 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + m_Mesh: {fileID: 0} +--- !u!114 &114075091806130127 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} + m_Name: + m_EditorClassIdentifier: + decimation: 0 + smoothing: 0 + twist: 0 + indexInSystem: 0 +--- !u!114 &114972033155067211 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} + m_Name: + m_EditorClassIdentifier: + material: {fileID: 0} + renderParameters: + layer: 0 + lightProbeUsage: 1 + reflectionProbeUsage: 1 + shadowCastingMode: 1 + receiveShadows: 1 + motionVectors: 0 + renderingLayerMask: 4294967295 + uvAnchor: 0 + uvScale: {x: 1, y: 1} + normalizeV: 1 + section: {fileID: 0} + thicknessScale: 0.8 +--- !u!114 &114977355817525795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actor: {fileID: 114941221864603208} + m_Target: {fileID: 0} + m_ParticleGroup: {fileID: 0} + m_AttachmentType: 0 + m_ConstrainOrientation: 0 + m_Projection: 0 + m_Compliance: 0 + breakThreshold: Infinity +--- !u!114 &114623075352630189 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actor: {fileID: 114941221864603208} + m_Target: {fileID: 0} + m_ParticleGroup: {fileID: 0} + m_AttachmentType: 0 + m_ConstrainOrientation: 0 + m_Projection: 0 + m_Compliance: 0 + breakThreshold: Infinity +--- !u!114 &114422070939195681 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8285ac97113f74d449053378d0e3a56b, type: 3} + m_Name: + m_EditorClassIdentifier: + m_CursorMu: 0 + m_SourceMu: 0 + direction: 1 +--- !u!114 &114504105083509877 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1933124697579601} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98ba9d435a0e49c9bb527c34cc91894d, type: 3} + m_Name: + m_EditorClassIdentifier: + rope: {fileID: 114941221864603208} + cursor: {fileID: 114422070939195681} + percentageElasticity: 1 +--- !u!1 &1943073364215513 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4507755321481054} + - component: {fileID: 120710333716555736} + - component: {fileID: 4922671409596527468} + m_Layer: 0 + m_Name: Rod Line + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4507755321481054 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1943073364215513} + 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: [] + m_Father: {fileID: 4283454774123242} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!120 &120710333716555736 +LineRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1943073364215513} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4be07647ecdb4b845a9e0fbc74bb0e0a, 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: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Positions: + - {x: 0, y: 0, z: 0} + - {x: 0, y: 0, z: 1} + m_Parameters: + serializedVersion: 3 + widthMultiplier: 1 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 0 + textureScale: {x: 1, y: 1} + shadowBias: 0.5 + generateLightingData: 0 + m_MaskInteraction: 0 + m_UseWorldSpace: 1 + m_Loop: 0 + m_ApplyActiveColorSpace: 1 +--- !u!114 &4922671409596527468 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1943073364215513} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5625b86b9e4b4482b82d83b962d0c873, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::RodLine diff --git a/Assets/ResRaw/Prefabs/Player/Line/fishing line float set.prefab.meta b/Assets/ResRaw/Prefabs/Player/Line/fishing line float set.prefab.meta new file mode 100644 index 000000000..6213ec9bf --- /dev/null +++ b/Assets/ResRaw/Prefabs/Player/Line/fishing line float set.prefab.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b52fb637550f9ee478a2359cd713ba16 +timeCreated: 1762387921 +licenseType: Free +PrefabImporter: + externalObjects: {} + addedObjectFileIDs: + isPrefabVariant: 0 + variantParentGUID: 00000000000000000000000000000000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ResRaw/Prefabs/Player/Line/fishing line spinning.prefab b/Assets/ResRaw/Prefabs/Player/Line/fishing line spinning.prefab new file mode 100644 index 000000000..5c1efaf0f --- /dev/null +++ b/Assets/ResRaw/Prefabs/Player/Line/fishing line spinning.prefab @@ -0,0 +1,623 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1272090113571811 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4789330476915334} + - component: {fileID: 114739639280597265} + m_Layer: 0 + m_Name: fishing line spinning + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4789330476915334 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1272090113571811} + 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: 4234306782235173} + - {fileID: 4141014065636101} + - {fileID: 4890516850959192} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114739639280597265 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1272090113571811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c0403ffd74ce46fab8bd4ef057e51432, type: 3} + m_Name: + m_EditorClassIdentifier: + startParticleAttachment: {fileID: 114052339901978322} + isLureConnect: 1 + rodLine: {fileID: 4297776814324645408} + fishingRope: {fileID: 114821237079273711} + LineLength: 0.5 +--- !u!1 &1283354022407552 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4234306782235173} + - component: {fileID: 114183814398187982} + - component: {fileID: 23093650087846247} + - component: {fileID: 33180971188188480} + - component: {fileID: 114312629507617460} + - component: {fileID: 114606677337991535} + - component: {fileID: 114052339901978322} + - component: {fileID: 114975473824467752} + - component: {fileID: 114821237079273711} + m_Layer: 0 + m_Name: Fishing Line + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4234306782235173 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1283354022407552} + 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: [] + m_Father: {fileID: 4789330476915334} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114183814398187982 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1283354022407552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} + m_Name: + m_EditorClassIdentifier: + solverIndices: + serializedContents: + m_AlignBytes: 16 + groupID: 0 + m_CollisionMaterial: {fileID: 0} + m_SurfaceCollisions: 0 + m_MassScale: 1 + m_SelfCollisions: 0 + restLength_: 0 + elements: [] + _aerodynamicsEnabled: 1 + _drag: 0.05 + _lift: 0.02 + m_RopeBlueprint: {fileID: 0} + tearingEnabled: 0 + tearResistanceMultiplier: 1000 + tearRate: 1 + _distanceConstraintsEnabled: 1 + _stretchingScale: 1 + _stretchCompliance: 0 + _maxCompression: 0 + _bendConstraintsEnabled: 1 + _bendCompliance: 0 + _maxBending: 0.025 + _plasticYield: 0 + _plasticCreep: 0 +--- !u!23 &23093650087846247 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1283354022407552} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4be07647ecdb4b845a9e0fbc74bb0e0a, 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: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &33180971188188480 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1283354022407552} + m_Mesh: {fileID: 0} +--- !u!114 &114312629507617460 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1283354022407552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} + m_Name: + m_EditorClassIdentifier: + decimation: 0 + smoothing: 3 + twist: 25 + indexInSystem: 0 +--- !u!114 &114606677337991535 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1283354022407552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} + m_Name: + m_EditorClassIdentifier: + material: {fileID: 0} + renderParameters: + layer: 0 + lightProbeUsage: 1 + reflectionProbeUsage: 1 + shadowCastingMode: 1 + receiveShadows: 1 + motionVectors: 0 + renderingLayerMask: 4294967295 + uvAnchor: 0 + uvScale: {x: 1, y: 1} + normalizeV: 1 + section: {fileID: 0} + thicknessScale: 0.8 +--- !u!114 &114052339901978322 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1283354022407552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actor: {fileID: 114183814398187982} + m_Target: {fileID: 0} + m_ParticleGroup: {fileID: 0} + m_AttachmentType: 0 + m_ConstrainOrientation: 0 + m_Projection: 0 + m_Compliance: 0 + breakThreshold: Infinity +--- !u!114 &114975473824467752 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1283354022407552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actor: {fileID: 114183814398187982} + m_Target: {fileID: 0} + m_ParticleGroup: {fileID: 0} + m_AttachmentType: 0 + m_ConstrainOrientation: 0 + m_Projection: 0 + m_Compliance: 0 + breakThreshold: Infinity +--- !u!114 &114821237079273711 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1283354022407552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98ba9d435a0e49c9bb527c34cc91894d, type: 3} + m_Name: + m_EditorClassIdentifier: + rope: {fileID: 0} + cursor: {fileID: 0} + percentageElasticity: 1 +--- !u!1 &1593910372182423 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4141014065636101} + - component: {fileID: 120106974709276864} + - component: {fileID: 4297776814324645408} + m_Layer: 0 + m_Name: Rod Line + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4141014065636101 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1593910372182423} + 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: [] + m_Father: {fileID: 4789330476915334} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!120 &120106974709276864 +LineRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1593910372182423} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4be07647ecdb4b845a9e0fbc74bb0e0a, 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: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Positions: + - {x: 0, y: 0, z: 0} + - {x: 0, y: 0, z: 1} + m_Parameters: + serializedVersion: 3 + widthMultiplier: 1 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 3 + numCapVertices: 3 + alignment: 0 + textureMode: 0 + textureScale: {x: 1, y: 1} + shadowBias: 0.5 + generateLightingData: 0 + m_MaskInteraction: 0 + m_UseWorldSpace: 1 + m_Loop: 0 + m_ApplyActiveColorSpace: 1 +--- !u!114 &4297776814324645408 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1593910372182423} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5625b86b9e4b4482b82d83b962d0c873, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::RodLine +--- !u!1 &1900952002951889 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4890516850959192} + - component: {fileID: 54576891949597541} + - component: {fileID: 153265847269300219} + - component: {fileID: 135766751052608187} + m_Layer: 7 + m_Name: Lure + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4890516850959192 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1900952002951889} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4789330476915334} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!54 &54576891949597541 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1900952002951889} + serializedVersion: 5 + m_Mass: 0.1 + m_LinearDamping: 1 + m_AngularDamping: 1 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 0.001, y: 0.001, z: 0.001} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 0 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 2 +--- !u!153 &153265847269300219 +ConfigurableJoint: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1900952002951889} + serializedVersion: 4 + m_ConnectedBody: {fileID: 0} + m_ConnectedArticulationBody: {fileID: 0} + m_Anchor: {x: 0, y: 0, z: 0} + m_Axis: {x: 0, y: 0, z: 0} + m_AutoConfigureConnectedAnchor: 0 + m_ConnectedAnchor: {x: 0, y: 0, z: 0} + m_SecondaryAxis: {x: 0, y: 0, z: 0} + m_XMotion: 1 + m_YMotion: 1 + m_ZMotion: 1 + m_AngularXMotion: 2 + m_AngularYMotion: 2 + m_AngularZMotion: 2 + m_LinearLimitSpring: + spring: 0 + damper: 0 + m_LinearLimit: + limit: 0.5 + bounciness: 0 + contactDistance: 0 + m_AngularXLimitSpring: + spring: 0 + damper: 0 + m_LowAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_HighAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularYZLimitSpring: + spring: 0 + damper: 0 + m_AngularYLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularZLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_TargetPosition: {x: 0, y: 0, z: 0} + m_TargetVelocity: {x: 0, y: 0, z: 0} + m_XDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_YDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_TargetRotation: {x: 0, y: 0, z: 0, w: 1} + m_TargetAngularVelocity: {x: 0, y: 0, z: 0} + m_RotationDriveMode: 0 + m_AngularXDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_AngularYZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_SlerpDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ProjectionMode: 1 + m_ProjectionDistance: 0.1 + m_ProjectionAngle: 0 + m_ConfiguredInWorldSpace: 0 + m_SwapBodies: 0 + m_BreakForce: Infinity + m_BreakTorque: Infinity + m_EnableCollision: 0 + m_EnablePreprocessing: 0 + m_MassScale: 1 + m_ConnectedMassScale: 1 +--- !u!135 &135766751052608187 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1900952002951889} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Radius: 2 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/ResRaw/Prefabs/Player/Line/fishing line spinning.prefab.meta b/Assets/ResRaw/Prefabs/Player/Line/fishing line spinning.prefab.meta new file mode 100644 index 000000000..56225e8a8 --- /dev/null +++ b/Assets/ResRaw/Prefabs/Player/Line/fishing line spinning.prefab.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4aae278494bb1db48a89372b08390cf5 +timeCreated: 1762387921 +licenseType: Free +PrefabImporter: + externalObjects: {} + addedObjectFileIDs: + isPrefabVariant: 0 + variantParentGUID: 00000000000000000000000000000000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Demo/Rope.cs b/Assets/Scripts/Demo/Rope.cs index b1784e9a8..87a0d5321 100644 --- a/Assets/Scripts/Demo/Rope.cs +++ b/Assets/Scripts/Demo/Rope.cs @@ -1,246 +1,246 @@ -using UnityEngine; - -[RequireComponent(typeof(LineRenderer))] -public class Rope : MonoBehaviour -{ - [Header("Attachment Points")] [SerializeField] - public Transform startAttachment; // 绳子起点绑定的Transform - - [SerializeField] public Transform endAttachment; // 绳子终点绑定的Transform - - [Header("Verlet Parameters")] [SerializeField] - float nodeDistance = 0.35f; - - [SerializeField] float nodeColliderRadius = 0.2f; - [SerializeField] float gravityStrength = 2; - [SerializeField] float totalLength = 10f; - [SerializeField, Range(0, 1)] float velocityDampen = 0.95f; - [SerializeField, Range(0, 0.99f)] float stiffness = 0.8f; - [SerializeField] int iterateCollisionsEvery = 1; - [SerializeField] int iterations = 10; - [SerializeField] int colliderBufferSize = 1; - - [Header("Line Renderer")] [SerializeField] - float ropeWidth = 0.1f; - - // 私有变量 - Vector3 gravity; - - // 数组和缓存 - Vector3[] currentNodePositions; - Vector3[] previousNodePositions; - Collider[] colliderHitBuffer; - LineRenderer lineRenderer; - GameObject nodeTester; - SphereCollider nodeCollider; - int totalNodes; - float lastTotalLength; - - void Awake() - { - // 获取组件引用 - lineRenderer = GetComponent(); - gravity = new Vector3(0, -gravityStrength, 0); - - // 初始化节点测试器 - nodeTester = new GameObject("Node Tester"); - nodeTester.layer = 8; - nodeCollider = nodeTester.AddComponent(); - nodeCollider.radius = nodeColliderRadius; - - // 初始化长度跟踪 - lastTotalLength = totalLength; - InitializeRope(); - } - - void InitializeRope() - { - // 计算节点数量 - totalNodes = Mathf.FloorToInt(totalLength / nodeDistance) + 1; - float remainingLength = totalLength % nodeDistance; - - if (remainingLength > 0 && totalLength > nodeDistance) - { - totalNodes++; - } - - // 初始化或调整数组大小 - System.Array.Resize(ref currentNodePositions, totalNodes); - System.Array.Resize(ref previousNodePositions, totalNodes); - colliderHitBuffer = new Collider[colliderBufferSize]; - - // 初始化节点位置 - Vector3 startPos = startAttachment != null ? startAttachment.position : transform.position; - for (int i = 0; i < totalNodes; i++) - { - float distance = (i == totalNodes - 1 && remainingLength > 0) ? remainingLength : nodeDistance; - - currentNodePositions[i] = startPos; - previousNodePositions[i] = startPos; - startPos.y -= distance; - } - - // 设置线渲染器 - lineRenderer.startWidth = ropeWidth; - lineRenderer.endWidth = ropeWidth; - lineRenderer.positionCount = totalNodes; - } - - void Update() - { - // 检查长度是否变化 - if (!Mathf.Approximately(totalLength, lastTotalLength)) - { - AdjustRopeLength(); - lastTotalLength = totalLength; - } - - DrawRope(); - } - - void AdjustRopeLength() - { - Vector3[] oldPositions = (Vector3[])currentNodePositions.Clone(); - Vector3[] oldPrevPositions = (Vector3[])previousNodePositions.Clone(); - - InitializeRope(); - - int copyLength = Mathf.Min(oldPositions.Length, currentNodePositions.Length); - System.Array.Copy(oldPositions, currentNodePositions, copyLength); - System.Array.Copy(oldPrevPositions, previousNodePositions, copyLength); - - if (currentNodePositions.Length > oldPositions.Length) - { - Vector3 lastPos = oldPositions[oldPositions.Length - 1]; - for (int i = oldPositions.Length; i < currentNodePositions.Length; i++) - { - float distance = (i == currentNodePositions.Length - 1 && (totalLength % nodeDistance) > 0) - ? (totalLength % nodeDistance) - : nodeDistance; - - lastPos.y -= distance; - currentNodePositions[i] = lastPos; - previousNodePositions[i] = lastPos; - } - } - } - - void FixedUpdate() - { - Simulate(); - - for (int i = 0; i < iterations; i++) - { - ApplyConstraint(); - - if (i % (iterateCollisionsEvery + 1) == 0) - { - AdjustCollisions(); - } - } - } - - void Simulate() - { - float fixedDt = Time.fixedDeltaTime; - for (int i = 0; i < totalNodes; i++) - { - Vector3 velocity = (currentNodePositions[i] - previousNodePositions[i]) * velocityDampen; - previousNodePositions[i] = currentNodePositions[i]; - currentNodePositions[i] += velocity + gravity * fixedDt; - } - } - - void ApplyConstraint() - { - // 绑定到起点Transform - if (startAttachment != null) - { - currentNodePositions[0] = startAttachment.position; - } - - // 绑定到终点Transform - if (endAttachment != null) - { - currentNodePositions[totalNodes - 1] = endAttachment.position; - } - - float halfStiffness = 0.5f * stiffness; - int nodeCountMinusOne = totalNodes - 1; - - for (int i = 0; i < nodeCountMinusOne; i++) - { - Vector3 node1 = currentNodePositions[i]; - Vector3 node2 = currentNodePositions[i + 1]; - Vector3 diff = node1 - node2; - - float desiredDistance = (i == nodeCountMinusOne - 1 && (totalLength % nodeDistance) > 0) - ? (totalLength % nodeDistance) - : nodeDistance; - - float sqrDesiredDistance = desiredDistance * desiredDistance; - float sqrDistance = diff.x * diff.x + diff.y * diff.y + diff.z * diff.z; - - if (Mathf.Abs(sqrDistance - sqrDesiredDistance) > 0.001f) - { - float distance = Mathf.Sqrt(sqrDistance); - float difference = desiredDistance - distance; - Vector3 direction = diff / distance; - - Vector3 adjustment = direction * (difference * halfStiffness); - - currentNodePositions[i] += adjustment; - currentNodePositions[i + 1] -= adjustment; - } - } - } - - void AdjustCollisions() - { - for (int i = 1; i < totalNodes; i += 2) - { - int hits = Physics.OverlapSphereNonAlloc( - currentNodePositions[i], - nodeColliderRadius, - colliderHitBuffer, - ~(1 << 8)); - - for (int n = 0; n < hits; n++) - { - if (Physics.ComputePenetration( - nodeCollider, - currentNodePositions[i], - Quaternion.identity, - colliderHitBuffer[n], - colliderHitBuffer[n].transform.position, - colliderHitBuffer[n].transform.rotation, - out Vector3 direction, - out float distance)) - { - currentNodePositions[i] += direction * distance; - } - } - } - } - - void DrawRope() - { - lineRenderer.positionCount = totalNodes; - lineRenderer.SetPositions(currentNodePositions); - } - - void OnDestroy() - { - if (nodeTester != null) - { - Destroy(nodeTester); - } - } - - // 公开方法用于动态设置绑定点 - public void SetAttachments(Transform start, Transform end) - { - startAttachment = start; - endAttachment = end; - } -} \ No newline at end of file +// using UnityEngine; +// +// [RequireComponent(typeof(LineRenderer))] +// public class Rope : MonoBehaviour +// { +// [Header("Attachment Points")] [SerializeField] +// public Transform startAttachment; // 绳子起点绑定的Transform +// +// [SerializeField] public Transform endAttachment; // 绳子终点绑定的Transform +// +// [Header("Verlet Parameters")] [SerializeField] +// float nodeDistance = 0.35f; +// +// [SerializeField] float nodeColliderRadius = 0.2f; +// [SerializeField] float gravityStrength = 2; +// [SerializeField] float totalLength = 10f; +// [SerializeField, Range(0, 1)] float velocityDampen = 0.95f; +// [SerializeField, Range(0, 0.99f)] float stiffness = 0.8f; +// [SerializeField] int iterateCollisionsEvery = 1; +// [SerializeField] int iterations = 10; +// [SerializeField] int colliderBufferSize = 1; +// +// [Header("Line Renderer")] [SerializeField] +// float ropeWidth = 0.1f; +// +// // 私有变量 +// Vector3 gravity; +// +// // 数组和缓存 +// Vector3[] currentNodePositions; +// Vector3[] previousNodePositions; +// Collider[] colliderHitBuffer; +// LineRenderer lineRenderer; +// GameObject nodeTester; +// SphereCollider nodeCollider; +// int totalNodes; +// float lastTotalLength; +// +// void Awake() +// { +// // 获取组件引用 +// lineRenderer = GetComponent(); +// gravity = new Vector3(0, -gravityStrength, 0); +// +// // 初始化节点测试器 +// nodeTester = new GameObject("Node Tester"); +// nodeTester.layer = 8; +// nodeCollider = nodeTester.AddComponent(); +// nodeCollider.radius = nodeColliderRadius; +// +// // 初始化长度跟踪 +// lastTotalLength = totalLength; +// InitializeRope(); +// } +// +// void InitializeRope() +// { +// // 计算节点数量 +// totalNodes = Mathf.FloorToInt(totalLength / nodeDistance) + 1; +// float remainingLength = totalLength % nodeDistance; +// +// if (remainingLength > 0 && totalLength > nodeDistance) +// { +// totalNodes++; +// } +// +// // 初始化或调整数组大小 +// System.Array.Resize(ref currentNodePositions, totalNodes); +// System.Array.Resize(ref previousNodePositions, totalNodes); +// colliderHitBuffer = new Collider[colliderBufferSize]; +// +// // 初始化节点位置 +// Vector3 startPos = startAttachment != null ? startAttachment.position : transform.position; +// for (int i = 0; i < totalNodes; i++) +// { +// float distance = (i == totalNodes - 1 && remainingLength > 0) ? remainingLength : nodeDistance; +// +// currentNodePositions[i] = startPos; +// previousNodePositions[i] = startPos; +// startPos.y -= distance; +// } +// +// // 设置线渲染器 +// lineRenderer.startWidth = ropeWidth; +// lineRenderer.endWidth = ropeWidth; +// lineRenderer.positionCount = totalNodes; +// } +// +// void Update() +// { +// // 检查长度是否变化 +// if (!Mathf.Approximately(totalLength, lastTotalLength)) +// { +// AdjustRopeLength(); +// lastTotalLength = totalLength; +// } +// +// DrawRope(); +// } +// +// void AdjustRopeLength() +// { +// Vector3[] oldPositions = (Vector3[])currentNodePositions.Clone(); +// Vector3[] oldPrevPositions = (Vector3[])previousNodePositions.Clone(); +// +// InitializeRope(); +// +// int copyLength = Mathf.Min(oldPositions.Length, currentNodePositions.Length); +// System.Array.Copy(oldPositions, currentNodePositions, copyLength); +// System.Array.Copy(oldPrevPositions, previousNodePositions, copyLength); +// +// if (currentNodePositions.Length > oldPositions.Length) +// { +// Vector3 lastPos = oldPositions[oldPositions.Length - 1]; +// for (int i = oldPositions.Length; i < currentNodePositions.Length; i++) +// { +// float distance = (i == currentNodePositions.Length - 1 && (totalLength % nodeDistance) > 0) +// ? (totalLength % nodeDistance) +// : nodeDistance; +// +// lastPos.y -= distance; +// currentNodePositions[i] = lastPos; +// previousNodePositions[i] = lastPos; +// } +// } +// } +// +// void FixedUpdate() +// { +// Simulate(); +// +// for (int i = 0; i < iterations; i++) +// { +// ApplyConstraint(); +// +// if (i % (iterateCollisionsEvery + 1) == 0) +// { +// AdjustCollisions(); +// } +// } +// } +// +// void Simulate() +// { +// float fixedDt = Time.fixedDeltaTime; +// for (int i = 0; i < totalNodes; i++) +// { +// Vector3 velocity = (currentNodePositions[i] - previousNodePositions[i]) * velocityDampen; +// previousNodePositions[i] = currentNodePositions[i]; +// currentNodePositions[i] += velocity + gravity * fixedDt; +// } +// } +// +// void ApplyConstraint() +// { +// // 绑定到起点Transform +// if (startAttachment != null) +// { +// currentNodePositions[0] = startAttachment.position; +// } +// +// // 绑定到终点Transform +// if (endAttachment != null) +// { +// currentNodePositions[totalNodes - 1] = endAttachment.position; +// } +// +// float halfStiffness = 0.5f * stiffness; +// int nodeCountMinusOne = totalNodes - 1; +// +// for (int i = 0; i < nodeCountMinusOne; i++) +// { +// Vector3 node1 = currentNodePositions[i]; +// Vector3 node2 = currentNodePositions[i + 1]; +// Vector3 diff = node1 - node2; +// +// float desiredDistance = (i == nodeCountMinusOne - 1 && (totalLength % nodeDistance) > 0) +// ? (totalLength % nodeDistance) +// : nodeDistance; +// +// float sqrDesiredDistance = desiredDistance * desiredDistance; +// float sqrDistance = diff.x * diff.x + diff.y * diff.y + diff.z * diff.z; +// +// if (Mathf.Abs(sqrDistance - sqrDesiredDistance) > 0.001f) +// { +// float distance = Mathf.Sqrt(sqrDistance); +// float difference = desiredDistance - distance; +// Vector3 direction = diff / distance; +// +// Vector3 adjustment = direction * (difference * halfStiffness); +// +// currentNodePositions[i] += adjustment; +// currentNodePositions[i + 1] -= adjustment; +// } +// } +// } +// +// void AdjustCollisions() +// { +// for (int i = 1; i < totalNodes; i += 2) +// { +// int hits = Physics.OverlapSphereNonAlloc( +// currentNodePositions[i], +// nodeColliderRadius, +// colliderHitBuffer, +// ~(1 << 8)); +// +// for (int n = 0; n < hits; n++) +// { +// if (Physics.ComputePenetration( +// nodeCollider, +// currentNodePositions[i], +// Quaternion.identity, +// colliderHitBuffer[n], +// colliderHitBuffer[n].transform.position, +// colliderHitBuffer[n].transform.rotation, +// out Vector3 direction, +// out float distance)) +// { +// currentNodePositions[i] += direction * distance; +// } +// } +// } +// } +// +// void DrawRope() +// { +// lineRenderer.positionCount = totalNodes; +// lineRenderer.SetPositions(currentNodePositions); +// } +// +// void OnDestroy() +// { +// if (nodeTester != null) +// { +// Destroy(nodeTester); +// } +// } +// +// // 公开方法用于动态设置绑定点 +// public void SetAttachments(Transform start, Transform end) +// { +// startAttachment = start; +// endAttachment = end; +// } +// } \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Rope.meta b/Assets/Scripts/Fishing/Rope.meta new file mode 100644 index 000000000..7f5f23fb1 --- /dev/null +++ b/Assets/Scripts/Fishing/Rope.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1330e7f73f804eea8ae09724f6bb1039 +timeCreated: 1766759962 \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Rope/RodLine.cs b/Assets/Scripts/Fishing/Rope/RodLine.cs new file mode 100644 index 000000000..ea3e8a5b0 --- /dev/null +++ b/Assets/Scripts/Fishing/Rope/RodLine.cs @@ -0,0 +1,56 @@ +using Obi; +using UnityEngine; + +public class RodLine : MonoBehaviour +{ + private ObiRope obiRope; + + private LineRenderer lineRenderer; + + private Transform[] points; + + public void GenerateLineRendererRope(Transform[] points, float thickness) + { + if (points.Length < 2) + { + Debug.LogError("LineRenderer requires at least two points."); + return; + } + + this.points = points; + if (lineRenderer == null) + { + lineRenderer = base.gameObject.GetComponent(); + if (lineRenderer == null) + { + lineRenderer = base.gameObject.AddComponent(); + } + } + + lineRenderer.positionCount = points.Length; + lineRenderer.startWidth = thickness; + lineRenderer.endWidth = thickness; + for (int i = 0; i < points.Length; i++) + { + lineRenderer.SetPosition(i, points[i].position); + } + } + + private void LateUpdate() + { + if (lineRenderer == null) + { + return; + } + + for (int i = 0; i < points.Length; i++) + { + Transform transform = points[i]; + if ((bool)transform) + { + lineRenderer.SetPosition(i, transform.position); + } + } + } + +} \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Rope/RodLine.cs.meta b/Assets/Scripts/Fishing/Rope/RodLine.cs.meta new file mode 100644 index 000000000..b8b54ea1b --- /dev/null +++ b/Assets/Scripts/Fishing/Rope/RodLine.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5625b86b9e4b4482b82d83b962d0c873 +timeCreated: 1766759973 \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Rope/Rope.cs b/Assets/Scripts/Fishing/Rope/Rope.cs new file mode 100644 index 000000000..c209882d8 --- /dev/null +++ b/Assets/Scripts/Fishing/Rope/Rope.cs @@ -0,0 +1,35 @@ +using NBF; +using Obi; +using UnityEngine; + +public class Rope : MonoBehaviour +{ + private FRod _rod; + [SerializeField] private ObiRope rope; + + [SerializeField] private ObiRopeCursor cursor; + + [SerializeField] private float percentageElasticity = 0.2f; + + private float stretchScale; + + private void Awake() + { + rope = GetComponent(); + if (_rod) + { + LineLength_OnValueChanged(_rod.lineLength); + } + } + + public void LineLength_OnValueChanged(float length) + { + cursor = ((cursor == null) ? GetComponent() : cursor); + stretchScale = Mathf.Clamp(length - percentageElasticity, 0f, float.PositiveInfinity); + } + + private void Update() + { + rope.stretchingScale = stretchScale; + } +} \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Rope/Rope.cs.meta b/Assets/Scripts/Fishing/Rope/Rope.cs.meta new file mode 100644 index 000000000..93d4824f7 --- /dev/null +++ b/Assets/Scripts/Fishing/Rope/Rope.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 98ba9d435a0e49c9bb527c34cc91894d +timeCreated: 1766759607 \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Tackle/FGearBase.cs b/Assets/Scripts/Fishing/Tackle/FGearBase.cs index cd63bb89c..1df049ad8 100644 --- a/Assets/Scripts/Fishing/Tackle/FGearBase.cs +++ b/Assets/Scripts/Fishing/Tackle/FGearBase.cs @@ -8,13 +8,7 @@ namespace NBF public FPlayer Player { get; protected set; } public FRod Rod { get; protected set; } public ItemInfo ItemInfo; - - public HookAsset hookAsset; - - private void Awake() - { - hookAsset = GetComponent(); - } + public virtual void Init(FPlayer player, FRod rod) { diff --git a/Assets/Scripts/Fishing/Tackle/FLine.cs b/Assets/Scripts/Fishing/Tackle/FLine.cs index 0f810dd2d..363e182ce 100644 --- a/Assets/Scripts/Fishing/Tackle/FLine.cs +++ b/Assets/Scripts/Fishing/Tackle/FLine.cs @@ -1,12 +1,25 @@ -using UnityEngine; +using Obi; +using UnityEngine; namespace NBF { public class FLine : FGearBase { + [SerializeField] private ObiParticleAttachment startParticleAttachment; + [SerializeField] private bool isLureConnect; + [SerializeField] private RodLine rodLine; + [SerializeField] private Rope fishingRope; + + public float LineLength = 0.5f; + + private float _groundSetting = 0.5f; + + private float _LineOnSpool = 100f; + + private float _LineThickness = 0.0007f; + protected override void OnInit() { - } } } \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Tackle/FLineHandler.cs b/Assets/Scripts/Fishing/Tackle/FLineHandler.cs index 295d7b1d9..7ef09e377 100644 --- a/Assets/Scripts/Fishing/Tackle/FLineHandler.cs +++ b/Assets/Scripts/Fishing/Tackle/FLineHandler.cs @@ -1,190 +1,190 @@ -using System; -using NBF; -using Obi; -using Unity.VisualScripting; -using UnityEngine; - -public class FLineHandler : MonoBehaviour -{ - public enum LineType - { - None = 0, - OneSegment = 1, - TwoSegment = 2, - ThereSegment = 3 - } - - public LineType lineType = LineType.TwoSegment; - - public ObiRope obiRopeSegment_1; - - public ObiRope obiRopeSegment_2; - - public ObiRope obiRopeSegment_3; - - public FixedLine LineConnector_0; - - public SpringJoint LineConnector_1; - - public SpringJoint LineConnector_2; - - public SpringJoint LineConnector_3; - - // [HideInInspector] public FFishingLine currentRodFishingLineComponent; - - // public ObiParticleAttachment toRodConnector; - - // public float PhisicsLineOut { get; set; } - - public float ObiLineOut; - - [HideInInspector] public Rigidbody EndLineRigidbody_0; - - [HideInInspector] public Rigidbody EndLineRigidbody_1; - - [HideInInspector] public Rigidbody EndLineRigidbody_2; - - [HideInInspector] public Rigidbody EndLineRigidbody_3; - - // public JointPinchController pinchController; - - public FRod Rod; - - private Transform waterPlane; - - - // public float ropeToHookDistance; - - void Start() - { - ObiLineOut = obiRopeSegment_1.stretchingScale; - if ((bool)LineConnector_0) - { - EndLineRigidbody_0 = LineConnector_0.GetComponent(); - } - - if ((bool)LineConnector_1) - { - EndLineRigidbody_1 = LineConnector_1.GetComponent(); - } - - if ((bool)LineConnector_2) - { - EndLineRigidbody_2 = LineConnector_2.GetComponent(); - // var fixedJoint = LineConnector_2.GetComponent(); - // pinchController = LineConnector_2.gameObject.AddComponent(); - } - - if ((bool)LineConnector_3) - { - EndLineRigidbody_3 = LineConnector_3.GetComponent(); - } - - waterPlane = GameObject.FindGameObjectWithTag("Water").transform; - - Debug.LogError($"rope.restLength={obiRopeSegment_1.restLength} LineConnector_1={LineConnector_1.maxDistance}"); - } - - - void Update() - { - if (!Rod) return; - - - // ropeToHookDistance = Vector3.Distance(toRodConnector.transform.position, LineConnector_1.transform.position); - - ObiLineOut = 0.1f + Rod.lineLength; - float target = (0f - Mathf.Clamp(Rod.linelenghtDiferent, -1f, 0f)) * 0.1f; - if (Rod.linelenghtDiferent >= 0f) - { - obiRopeSegment_1.stretchCompliance = Mathf.MoveTowards(obiRopeSegment_1.stretchCompliance, target, - Time.smoothDeltaTime * (1f * Rod.linelenghtDiferent)); - } - else - { - obiRopeSegment_1.stretchCompliance = Mathf.MoveTowards(obiRopeSegment_1.stretchCompliance, target, - Time.smoothDeltaTime * 0.1f); - } - - if (Rod.lineLength == 0f) - { - obiRopeSegment_1.stretchCompliance = 0f; - } - - if ((bool)obiRopeSegment_2) - { - if (!Rod.currentFish) - { - obiRopeSegment_2.stretchCompliance = obiRopeSegment_2.stretchingScale * 0.004f; - } - else - { - obiRopeSegment_2.stretchCompliance = 0f; - } - - //TODO:TEST - obiRopeSegment_2.stretchingScale = 0.13F; - } - - obiRopeSegment_1.stretchingScale = ObiLineOut; - obiRopeSegment_1.stretchingScale = 1; - LineConnector_1.maxDistance = 0.1f + Rod.lineLength; - if (Input.GetKey(KeyCode.E)) - { - // var speed = 1; - // obiRopeCursor_1.ChangeLength(LineConnector_1.maxDistance); - // Debug.Log(obiRopeSegment_1.restLength); - } - - // var addLength = LineConnector_1.maxDistance - obiRopeSegment_1.restLength; - // if (Mathf.Abs(addLength) > 0.001f) - // { - // obiRopeCursor_1.ChangeLength(LineConnector_1.maxDistance); - // } - - // if (!Mathf.Approximately(LineConnector_1.maxDistance, obiRopeSegment_1.restLength)) - // { - // obiRopeCursor_1.ChangeLength(LineConnector_1.maxDistance); - // } - - // obiRopeCursor_1.pos - - - // LineConnector_1.minDistance = LineConnector_1.maxDistance; - } - - public void SetSegmentTwoLenght(float lenght) - { - LineConnector_2.maxDistance = lenght; - // obiRopeCursor_2.ChangeLength(lenght); - // LineConnector_2.minDistance = LineConnector_2.maxDistance; - } - - private void FixedUpdate() - { - // BindRod(); - LineWaterDisplacement(); - } - - private void BindRod() - { - if (!Rod || !Rod.Asset) return; - LineConnector_0.transform.position = Rod.Asset.lineConnector.position; - } - - private void LineWaterDisplacement() - { - if (!waterPlane) - { - return; - } - - for (int i = 0; i < obiRopeSegment_1.activeParticleCount; i++) - { - if (obiRopeSegment_1.GetParticlePosition(i).y < waterPlane.position.y) - { - // obiRopeSegment_1.AddForceParticle(i, Vector3.up * 10f, ForceMode.Acceleration); - } - } - } -} \ No newline at end of file +// using System; +// using NBF; +// using Obi; +// using Unity.VisualScripting; +// using UnityEngine; +// +// public class FLineHandler : MonoBehaviour +// { +// public enum LineType +// { +// None = 0, +// OneSegment = 1, +// TwoSegment = 2, +// ThereSegment = 3 +// } +// +// public LineType lineType = LineType.TwoSegment; +// +// public ObiRope obiRopeSegment_1; +// +// public ObiRope obiRopeSegment_2; +// +// public ObiRope obiRopeSegment_3; +// +// public FixedLine LineConnector_0; +// +// public SpringJoint LineConnector_1; +// +// public SpringJoint LineConnector_2; +// +// public SpringJoint LineConnector_3; +// +// // [HideInInspector] public FFishingLine currentRodFishingLineComponent; +// +// // public ObiParticleAttachment toRodConnector; +// +// // public float PhisicsLineOut { get; set; } +// +// public float ObiLineOut; +// +// [HideInInspector] public Rigidbody EndLineRigidbody_0; +// +// [HideInInspector] public Rigidbody EndLineRigidbody_1; +// +// [HideInInspector] public Rigidbody EndLineRigidbody_2; +// +// [HideInInspector] public Rigidbody EndLineRigidbody_3; +// +// // public JointPinchController pinchController; +// +// public FRod Rod; +// +// private Transform waterPlane; +// +// +// // public float ropeToHookDistance; +// +// void Start() +// { +// ObiLineOut = obiRopeSegment_1.stretchingScale; +// if ((bool)LineConnector_0) +// { +// EndLineRigidbody_0 = LineConnector_0.GetComponent(); +// } +// +// if ((bool)LineConnector_1) +// { +// EndLineRigidbody_1 = LineConnector_1.GetComponent(); +// } +// +// if ((bool)LineConnector_2) +// { +// EndLineRigidbody_2 = LineConnector_2.GetComponent(); +// // var fixedJoint = LineConnector_2.GetComponent(); +// // pinchController = LineConnector_2.gameObject.AddComponent(); +// } +// +// if ((bool)LineConnector_3) +// { +// EndLineRigidbody_3 = LineConnector_3.GetComponent(); +// } +// +// waterPlane = GameObject.FindGameObjectWithTag("Water").transform; +// +// Debug.LogError($"rope.restLength={obiRopeSegment_1.restLength} LineConnector_1={LineConnector_1.maxDistance}"); +// } +// +// +// void Update() +// { +// if (!Rod) return; +// +// +// // ropeToHookDistance = Vector3.Distance(toRodConnector.transform.position, LineConnector_1.transform.position); +// +// ObiLineOut = 0.1f + Rod.lineLength; +// float target = (0f - Mathf.Clamp(Rod.linelenghtDiferent, -1f, 0f)) * 0.1f; +// if (Rod.linelenghtDiferent >= 0f) +// { +// obiRopeSegment_1.stretchCompliance = Mathf.MoveTowards(obiRopeSegment_1.stretchCompliance, target, +// Time.smoothDeltaTime * (1f * Rod.linelenghtDiferent)); +// } +// else +// { +// obiRopeSegment_1.stretchCompliance = Mathf.MoveTowards(obiRopeSegment_1.stretchCompliance, target, +// Time.smoothDeltaTime * 0.1f); +// } +// +// if (Rod.lineLength == 0f) +// { +// obiRopeSegment_1.stretchCompliance = 0f; +// } +// +// if ((bool)obiRopeSegment_2) +// { +// if (!Rod.currentFish) +// { +// obiRopeSegment_2.stretchCompliance = obiRopeSegment_2.stretchingScale * 0.004f; +// } +// else +// { +// obiRopeSegment_2.stretchCompliance = 0f; +// } +// +// //TODO:TEST +// obiRopeSegment_2.stretchingScale = 0.13F; +// } +// +// obiRopeSegment_1.stretchingScale = ObiLineOut; +// obiRopeSegment_1.stretchingScale = 1; +// LineConnector_1.maxDistance = 0.1f + Rod.lineLength; +// if (Input.GetKey(KeyCode.E)) +// { +// // var speed = 1; +// // obiRopeCursor_1.ChangeLength(LineConnector_1.maxDistance); +// // Debug.Log(obiRopeSegment_1.restLength); +// } +// +// // var addLength = LineConnector_1.maxDistance - obiRopeSegment_1.restLength; +// // if (Mathf.Abs(addLength) > 0.001f) +// // { +// // obiRopeCursor_1.ChangeLength(LineConnector_1.maxDistance); +// // } +// +// // if (!Mathf.Approximately(LineConnector_1.maxDistance, obiRopeSegment_1.restLength)) +// // { +// // obiRopeCursor_1.ChangeLength(LineConnector_1.maxDistance); +// // } +// +// // obiRopeCursor_1.pos +// +// +// // LineConnector_1.minDistance = LineConnector_1.maxDistance; +// } +// +// public void SetSegmentTwoLenght(float lenght) +// { +// LineConnector_2.maxDistance = lenght; +// // obiRopeCursor_2.ChangeLength(lenght); +// // LineConnector_2.minDistance = LineConnector_2.maxDistance; +// } +// +// private void FixedUpdate() +// { +// // BindRod(); +// LineWaterDisplacement(); +// } +// +// private void BindRod() +// { +// if (!Rod || !Rod.Asset) return; +// LineConnector_0.transform.position = Rod.Asset.lineConnector.position; +// } +// +// private void LineWaterDisplacement() +// { +// if (!waterPlane) +// { +// return; +// } +// +// for (int i = 0; i < obiRopeSegment_1.activeParticleCount; i++) +// { +// if (obiRopeSegment_1.GetParticlePosition(i).y < waterPlane.position.y) +// { +// // obiRopeSegment_1.AddForceParticle(i, Vector3.up * 10f, ForceMode.Acceleration); +// } +// } +// } +// } \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Tackle/FRod.cs b/Assets/Scripts/Fishing/Tackle/FRod.cs index 9ff8216ec..c1103c839 100644 --- a/Assets/Scripts/Fishing/Tackle/FRod.cs +++ b/Assets/Scripts/Fishing/Tackle/FRod.cs @@ -30,10 +30,6 @@ namespace NBF public FWeight Weight; public FLine Line; - /// - /// 鱼线处理器 - /// - public FLineHandler lineHandler; public Transform GearRoot; @@ -81,9 +77,12 @@ namespace NBF var parent = GearRoot; - CreateFishingHandler(); - List children = RoleModel.Instance.GetBindItems(itemInfo.Id); + + ItemInfo lineItemInfo = null; + + // CreateFishingHandler(); + // children.Sort(); foreach (var child in children) { @@ -124,7 +123,13 @@ namespace NBF Quaternion.identity); Weight.SetItemInfo(child); } + else if (itemType == ItemType.Line) + { + lineItemInfo = child; + } } + + yield return 1; if (Reel) @@ -136,40 +141,40 @@ namespace NBF Reel.Init(player, this); } - if (Bobber) - { - Bobber.Init(Player, this); - Bobber.transform.position = lineHandler.LineConnector_1.transform.position; - Bobber.gameObject.GetComponent().connectedBody = - lineHandler.LineConnector_1.GetComponent(); - } - - if (Hook) - { - Hook.Init(Player, this); - Hook.transform.position = lineHandler.LineConnector_2.transform.position; - Hook.transform.rotation = lineHandler.LineConnector_2.transform.rotation; // 确保旋转也同步 - var target = lineHandler.LineConnector_2.GetComponent(); - var joint = Hook.gameObject.GetComponent(); - joint.connectedBody = target; - // LureHookWaterDisplacement = Hook.GetComponent(); - } - - if (Bait) - { - Bait.Init(Player, this); - Bait.transform.position = Hook.hookAsset.baitConnector.position; - Bait.transform.SetParent(Hook.hookAsset.baitConnector); - } - - if (Lure) - { - Lure.Init(Player, this); - Lure.transform.position = lineHandler.LineConnector_1.transform.position; - Lure.gameObject.GetComponent().connectedBody = - lineHandler.LineConnector_1.GetComponent(); - // LureHookWaterDisplacement = Lure.GetComponent(); - } + // if (Bobber) + // { + // Bobber.Init(Player, this); + // Bobber.transform.position = lineHandler.LineConnector_1.transform.position; + // Bobber.gameObject.GetComponent().connectedBody = + // lineHandler.LineConnector_1.GetComponent(); + // } + // + // if (Hook) + // { + // Hook.Init(Player, this); + // Hook.transform.position = lineHandler.LineConnector_2.transform.position; + // Hook.transform.rotation = lineHandler.LineConnector_2.transform.rotation; // 确保旋转也同步 + // var target = lineHandler.LineConnector_2.GetComponent(); + // var joint = Hook.gameObject.GetComponent(); + // joint.connectedBody = target; + // // LureHookWaterDisplacement = Hook.GetComponent(); + // } + // + // if (Bait) + // { + // Bait.Init(Player, this); + // Bait.transform.position = Hook.hookAsset.baitConnector.position; + // Bait.transform.SetParent(Hook.hookAsset.baitConnector); + // } + // + // if (Lure) + // { + // Lure.Init(Player, this); + // Lure.transform.position = lineHandler.LineConnector_1.transform.position; + // Lure.gameObject.GetComponent().connectedBody = + // lineHandler.LineConnector_1.GetComponent(); + // // LureHookWaterDisplacement = Lure.GetComponent(); + // } if (Weight) { @@ -223,95 +228,5 @@ namespace NBF rings = list.ToArray(); } - - - public void CreateFishingHandler() - { - if (lineHandler == null) - { - Debug.LogError("创建钓组====="); - var rodType = (ItemSubType)ItemInfo.Config.Type; - if (rodType == ItemSubType.RodTele) - { - CreateObiFishingLine(0); - } - else if (rodType == ItemSubType.RodSpine || rodType == ItemSubType.RodBolo) - { - CreateObiFishingLine(1); - } - } - } - - public void CreateObiFishingLine(int currentLineTypeIndex) - { - // if ((bool)Owner.Gears.Reel && !currentLineHandler) - if (!lineHandler) - { - var indexNames = new[] { "FFishingLine_0", "FFishingLine_1" }; - var path = - $"Assets/ResRaw/Prefabs/{indexNames[currentLineTypeIndex]}.prefab"; //$"GameItemsPrefabs/Lines/{indexNames[currentLineTypeIndex]}"; - var prefab = Assets.Load(path); - - // var toRodConnector = rodAsset.lineConnector.GetComponent(); - GameObject obj = Instantiate(prefab, GearRoot.position, Quaternion.identity, GearRoot); - - lineHandler = obj.GetComponent(); - // lineHandler.transform.SetParent(toRodConnector.transform); - lineHandler.transform.position = Asset.lineConnector.position; - lineHandler.LineConnector_0.target = Asset.lineConnector; //.GetComponent(); - // lineHandler.toRodConnector.target = rodAsset.lineConnector; - lineHandler.Rod = this; - // var obiSolver = lineHandler.GetComponent(); - // SceneSettings.Instance.obiFixedUpdater.solvers.Add(obiSolver); - } - } - - - public void RenderLine() - { - if (!lineHandler) - { - return; - } - - if (!Reel) return; - if (!Asset.lineRenderer) return; - - // var reel = Reel; - // int num = 0; - // bool isBlockLineByFinger = reel.isBlockLineByFinger; - // if (reel.AnimatorCtrl.Unlock && isBlockLineByFinger && reel.reelAsset.type == ReelAsset.Type.Normal) - // { - // Asset.lineRenderer.positionCount = rings.Length + 3; - // } - // else - // { - // Asset.lineRenderer.positionCount = rings.Length + 2; - // } - // - // Asset.lineRenderer.SetPosition(num, reel.reelAsset.lineIntersectHelper.position); - // num++; - // if (reel.AnimatorCtrl.Unlock && reel.reelAsset.type == ReelAsset.Type.Normal) - // { - // Asset.lineRenderer.SetPosition(num, reel.reelAsset.lineIntersect.position); - // num++; - // if (isBlockLineByFinger) - // { - // // Asset.lineRenderer.SetPosition(num, reel.reelAsset.lineFingerPoint.position); - // // num++; - // } - // } - // else - // { - // Asset.lineRenderer.SetPosition(num, reel.reelAsset.lineConnector.position); - // num++; - // } - // - // for (int num2 = 0; num2 < rings.Length; num2++) - // { - // Asset.lineRenderer.SetPosition(num, rings[num2].point.position); - // num++; - // } - } } } \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Bezier.cs b/Assets/Scripts/ThirdParty/PhysicsTools/Bezier.cs deleted file mode 100644 index 24f8b16da..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Bezier.cs +++ /dev/null @@ -1,176 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace PhysicsTools -{ - public class Bezier - { - private Vector3[] knots; - - private Vector3[] firstControlPts; - - private Vector3[] secondControlPts; - - private int lastIndex = 1; - - private float lengthCovered; - - private float indexedLength; - - private float totalLength; - - public Bezier(List points) - { - Vector3[] array = new Vector3[points.Count]; - for (int i = 0; i < points.Count; i++) - { - array[i] = points[i].pos; - } - init(array); - } - - public Bezier(Vector3[] points) - { - init(points); - } - - private void init(Vector3[] points) - { - knots = new Vector3[points.Length]; - for (int i = 0; i < points.Length; i++) - { - knots[i] = points[i]; - if (i != 0) - { - totalLength += (knots[i] - knots[i - 1]).magnitude; - } - } - GetCurveControlPoints(knots, out firstControlPts, out secondControlPts); - indexedLength = (knots[1] - knots[0]).magnitude; - } - - public float TotalLength() - { - return totalLength; - } - - public PosOri getNext(float deltaLen) - { - return new PosOri(getNextPos(deltaLen), Quaternion.identity); - } - - public Vector3 getNextPos(float deltaLen) - { - bool flag = false; - float num = indexedLength; - float num2 = indexedLength; - while (!flag) - { - num = indexedLength; - num2 = indexedLength - (knots[lastIndex] - knots[lastIndex - 1]).magnitude; - if (lengthCovered + deltaLen > num) - { - lastIndex++; - if (lastIndex == knots.Length) - { - flag = true; - deltaLen = num - lengthCovered; - lastIndex = knots.Length - 1; - } - else - { - indexedLength += (knots[lastIndex] - knots[lastIndex - 1]).magnitude; - } - continue; - } - break; - } - float num3 = (lengthCovered + deltaLen - num2) / (num - num2); - Vector3 result = (float)Math.Pow(1f - num3, 3.0) * knots[lastIndex - 1] + 3f * (float)Math.Pow(1f - num3, 2.0) * num3 * firstControlPts[lastIndex - 1] + 3f * (1f - num3) * num3 * num3 * secondControlPts[lastIndex - 1] + num3 * num3 * num3 * knots[lastIndex]; - lengthCovered += deltaLen; - return result; - } - - private void GetCurveControlPoints(Vector3[] knots, out Vector3[] firstControlPoints, out Vector3[] secondControlPoints) - { - if (knots == null) - { - throw new ArgumentNullException("knots"); - } - int num = knots.Length - 1; - if (num < 1) - { - throw new ArgumentException("At least two knot points required", "knots"); - } - if (num == 1) - { - firstControlPoints = new Vector3[1]; - firstControlPoints[0].x = (2f * knots[0].x + knots[1].x) / 3f; - firstControlPoints[0].y = (2f * knots[0].y + knots[1].y) / 3f; - firstControlPoints[0].z = (2f * knots[0].z + knots[1].z) / 3f; - secondControlPoints = new Vector3[1]; - secondControlPoints[0].x = 2f * firstControlPoints[0].x - knots[0].x; - secondControlPoints[0].y = 2f * firstControlPoints[0].y - knots[0].y; - secondControlPoints[0].z = 2f * firstControlPoints[0].z - knots[0].z; - return; - } - float[] array = new float[num]; - for (int i = 1; i < num - 1; i++) - { - array[i] = 4f * knots[i].x + 2f * knots[i + 1].x; - } - array[0] = knots[0].x + 2f * knots[1].x; - array[num - 1] = (8f * knots[num - 1].x + knots[num].x) / 2f; - float[] firstControlPoints2 = GetFirstControlPoints(array); - for (int j = 1; j < num - 1; j++) - { - array[j] = 4f * knots[j].y + 2f * knots[j + 1].y; - } - array[0] = knots[0].y + 2f * knots[1].y; - array[num - 1] = (8f * knots[num - 1].y + knots[num].y) / 2f; - float[] firstControlPoints3 = GetFirstControlPoints(array); - for (int k = 1; k < num - 1; k++) - { - array[k] = 4f * knots[k].z + 2f * knots[k + 1].z; - } - array[0] = knots[0].z + 2f * knots[1].z; - array[num - 1] = (8f * knots[num - 1].z + knots[num].z) / 2f; - float[] firstControlPoints4 = GetFirstControlPoints(array); - firstControlPoints = new Vector3[num]; - secondControlPoints = new Vector3[num]; - for (int l = 0; l < num; l++) - { - firstControlPoints[l] = new Vector3(firstControlPoints2[l], firstControlPoints3[l], firstControlPoints4[l]); - if (l < num - 1) - { - secondControlPoints[l] = new Vector3(2f * knots[l + 1].x - firstControlPoints2[l + 1], 2f * knots[l + 1].y - firstControlPoints3[l + 1], 2f * knots[l + 1].z - firstControlPoints4[l + 1]); - } - else - { - secondControlPoints[l] = new Vector3((knots[num].x + firstControlPoints2[num - 1]) / 2f, (knots[num].y + firstControlPoints3[num - 1]) / 2f, (knots[num].z + firstControlPoints4[num - 1]) / 2f); - } - } - } - - private float[] GetFirstControlPoints(float[] rhs) - { - int num = rhs.Length; - float[] array = new float[num]; - float[] array2 = new float[num]; - float num2 = 2f; - array[0] = rhs[0] / num2; - for (int i = 1; i < num; i++) - { - array2[i] = 1f / num2; - num2 = ((i >= num - 1) ? 3.5f : 4f) - array2[i]; - array[i] = (rhs[i] - array[i - 1]) / num2; - } - for (int j = 1; j < num; j++) - { - array[num - j - 1] -= array2[num - j] * array[num - j]; - } - return array; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Bezier.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/Bezier.cs.meta deleted file mode 100644 index d9018985f..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Bezier.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0cc4d18ef4a8ff6439959ca335b42593 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/BoneSegment.cs b/Assets/Scripts/ThirdParty/PhysicsTools/BoneSegment.cs deleted file mode 100644 index 9ead86ac7..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/BoneSegment.cs +++ /dev/null @@ -1,18 +0,0 @@ -using UnityEngine; - -namespace PhysicsTools -{ - internal class BoneSegment : Segment - { - public GameObject bone; - - public Matrix4x4 initTransform; - - public BoneSegment(string name, float len, Vector3 pos, Quaternion q, SegmentPropertiesBase segProperties, Rope r, GameObject b) - : base(name, len, pos, q, segProperties, r) - { - bone = b; - initTransform = seg.transform.worldToLocalMatrix * bone.transform.localToWorldMatrix; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/BoneSegment.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/BoneSegment.cs.meta deleted file mode 100644 index fe87bb3a9..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/BoneSegment.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7d9816d80c9fd754aaa984a288cd35d3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/ControlPoint.cs b/Assets/Scripts/ThirdParty/PhysicsTools/ControlPoint.cs deleted file mode 100644 index acfdc67ab..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/ControlPoint.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using UnityEngine; - -namespace PhysicsTools -{ - [Serializable] - public class ControlPoint - { - [Tooltip("Optional: Object")] - public GameObject obj; - - [Tooltip("Position through which rope will pass... If Object is specified then it is the local to the object otherwise it is global position")] - public Vector3 localPos; - - [Range(1f, 5f)] - [Tooltip("SlackFraction: How much of the rope length should be created between two control points... If it is more than 1 then a catenary is formed between the control points")] - public float slackFraction; - - [Tooltip("Specify whether it is attached to the control point or not")] - public bool attached; - - public ControlPoint() - { - obj = null; - slackFraction = 1f; - attached = true; - } - - public override string ToString() - { - return ((!(obj != null)) ? "Object: null" : ("Object:" + obj.ToString())) + ", Position: " + localPos.ToString() + ", SlackFraction: " + slackFraction + ", Attached: " + attached; - } - - public bool compare(ControlPoint rhs) - { - if (obj != rhs.obj || localPos != rhs.localPos || slackFraction != rhs.slackFraction || attached != rhs.attached) - { - return false; - } - return true; - } - - public ControlPoint clone() - { - ControlPoint controlPoint = new ControlPoint(); - controlPoint.obj = obj; - controlPoint.localPos = localPos; - controlPoint.slackFraction = slackFraction; - controlPoint.attached = attached; - return controlPoint; - } - - public Vector3 globalPos(Rope rope) - { - if (obj != null) - { - return obj.transform.TransformPoint(localPos); - } - return rope.transform.TransformPoint(localPos); - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/ControlPoint.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/ControlPoint.cs.meta deleted file mode 100644 index 2aace74af..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/ControlPoint.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 4c3919bd67247ecf47ac8b5970b70372 -timeCreated: 1747788126 -licenseType: Free -MonoImporter: - serializedVersion: 2 - name: - externalObjects: {} - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Joint.cs b/Assets/Scripts/ThirdParty/PhysicsTools/Joint.cs deleted file mode 100644 index 3a1d70e71..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Joint.cs +++ /dev/null @@ -1,142 +0,0 @@ -using UnityEngine; - -namespace PhysicsTools -{ - public class Joint - { - public UnityEngine.Joint joint; - - public Joint(Segment seg1, Segment seg2, JointProperties prop, SegmentPropertiesBase segProperties, Quaternion twistOffset) - { - if (seg2 == null) - { - } - seg2.seg.transform.rotation = seg2.seg.transform.rotation * twistOffset; - switch (prop.type) - { - case JointProperties.Type.HINGE_JOINT: - { - HingeJoint hingeJoint = seg1.seg.AddComponent(); - hingeJoint.autoConfigureConnectedAnchor = false; - joint = hingeJoint; - JointLimits limits = new JointLimits - { - min = 0f - prop.swingLimitDeg, - max = prop.swingLimitDeg - }; - joint.axis = new Vector3(0f, 0f, 1f); - hingeJoint.limits = limits; - break; - } - case JointProperties.Type.CONFIGURABLE_JOINT: - { - ConfigurableJoint configurableJoint = seg1.seg.AddComponent(); - configurableJoint.enableCollision = false; - configurableJoint.xMotion = ConfigurableJointMotion.Locked; - configurableJoint.yMotion = ConfigurableJointMotion.Locked; - configurableJoint.zMotion = ConfigurableJointMotion.Locked; - configurableJoint.angularXMotion = ConfigurableJointMotion.Limited; - configurableJoint.angularYMotion = ConfigurableJointMotion.Limited; - configurableJoint.angularZMotion = ConfigurableJointMotion.Limited; - configurableJoint.autoConfigureConnectedAnchor = false; - configurableJoint.lowAngularXLimit = new SoftJointLimit - { - limit = 0f - prop.twistLimitDeg - }; - configurableJoint.highAngularXLimit = new SoftJointLimit - { - limit = prop.twistLimitDeg - }; - configurableJoint.projectionMode = JointProjectionMode.PositionAndRotation; - configurableJoint.projectionDistance = prop.projectionDistance; - SoftJointLimit softJointLimit = new SoftJointLimit - { - limit = prop.swingLimitDeg - }; - configurableJoint.angularYLimit = softJointLimit; - configurableJoint.angularZLimit = softJointLimit; - joint = configurableJoint; - joint.axis = new Vector3(0f, 1f, 0f); - if (prop.breakingForce != 0f) - { - configurableJoint.breakForce = prop.breakingForce; - } - configurableJoint.enablePreprocessing = false; - break; - } - } - if (segProperties is SegmentPropertiesCylinder) - { - joint.anchor = new Vector3(0f, 1f - prop.offsetScale, 0f); - joint.connectedAnchor = new Vector3(0f, -1f + prop.offsetScale, 0f); - } - else - { - joint.anchor = new Vector3(0f, (1f - prop.offsetScale) / 2f, 0f); - joint.connectedAnchor = new Vector3(0f, (-1f + prop.offsetScale) / 2f, 0f); - } - joint.connectedBody = seg2.seg.GetComponent(); - } - - public Joint(GameObject seg1, GameObject seg2, Vector3 vGlobalAnchor, Vector3 vGlobalAxis, JointProperties prop, Rope r, int jtPos) - { - ConfigurableJoint configurableJoint = seg1.AddComponent(); - configurableJoint.enableCollision = false; - configurableJoint.xMotion = ConfigurableJointMotion.Limited; - configurableJoint.yMotion = ConfigurableJointMotion.Limited; - configurableJoint.zMotion = ConfigurableJointMotion.Limited; - configurableJoint.angularXMotion = ConfigurableJointMotion.Limited; - configurableJoint.angularYMotion = ConfigurableJointMotion.Free; - configurableJoint.angularZMotion = ConfigurableJointMotion.Free; - configurableJoint.anchor = seg1.transform.InverseTransformPoint(vGlobalAnchor); - configurableJoint.axis = seg1.transform.InverseTransformDirection(vGlobalAxis); - if (seg2 != null) - { - configurableJoint.connectedBody = seg2.GetComponent(); - } - SoftJointLimit linearLimit = new SoftJointLimit - { - limit = 0.01f - }; - SoftJointLimitSpring linearLimitSpring = default(SoftJointLimitSpring); - switch (jtPos) - { - case 0: - linearLimitSpring = r.getStartJtSpring(); - break; - case 1: - linearLimitSpring = r.getEndJtSpring(); - break; - default: - { - float damper = (linearLimitSpring.spring = 0f); - linearLimitSpring.damper = damper; - break; - } - } - if (linearLimitSpring.spring == 0f) - { - linearLimit.limit = 0f; - } - configurableJoint.linearLimitSpring = linearLimitSpring; - configurableJoint.linearLimit = linearLimit; - configurableJoint.projectionMode = JointProjectionMode.PositionAndRotation; - configurableJoint.projectionDistance = prop.projectionDistanceFirst; - configurableJoint.lowAngularXLimit = new SoftJointLimit - { - limit = 0f - prop.twistLimitDeg - }; - configurableJoint.highAngularXLimit = new SoftJointLimit - { - limit = prop.twistLimitDeg - }; - if (prop.breakingForce != 0f) - { - configurableJoint.breakForce = prop.breakingForce; - } - joint = configurableJoint; - configurableJoint.autoConfigureConnectedAnchor = false; - configurableJoint.enablePreprocessing = false; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Joint.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/Joint.cs.meta deleted file mode 100644 index 3a5ec9fcb..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Joint.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 3e680fa725d3066a2472a42dc6f1ba88 -timeCreated: 1747788127 -licenseType: Free -MonoImporter: - serializedVersion: 2 - name: - externalObjects: {} - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/JointProperties.cs b/Assets/Scripts/ThirdParty/PhysicsTools/JointProperties.cs deleted file mode 100644 index 4d7e2124b..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/JointProperties.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using UnityEngine; - -namespace PhysicsTools -{ - [Serializable] - public class JointProperties - { - [Serializable] - public enum Type - { - CONFIGURABLE_JOINT = 0, - HINGE_JOINT = 1 - } - - public Type type; - - [Range(0f, 180f)] - public float twistLimitDeg; - - [Range(0f, 180f)] - public float swingLimitDeg; - - [Range(0f, 0.5f)] - public float offsetScale; - - [Range(0f, 90f)] - public float twistOffsetDeg; - - public float breakingForce; - - public float projectionDistance; - - public float projectionDistanceFirst; - - public JointProperties() - { - type = Type.CONFIGURABLE_JOINT; - twistLimitDeg = 10f; - swingLimitDeg = 50f; - offsetScale = 0f; - twistOffsetDeg = 0f; - breakingForce = 0f; - projectionDistance = 0.1f; - projectionDistanceFirst = 0.001f; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/JointProperties.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/JointProperties.cs.meta deleted file mode 100644 index 418ef8093..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/JointProperties.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 09ae8cd9a6c1c324b8c2a2a78ac60d7d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/LinkMesh.cs b/Assets/Scripts/ThirdParty/PhysicsTools/LinkMesh.cs deleted file mode 100644 index dab64351a..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/LinkMesh.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using UnityEngine; - -namespace PhysicsTools -{ - [Serializable] - public class LinkMesh - { - [HideInInspector] - public Mesh modifiedMesh; - - [HideInInspector] - public Matrix4x4 transform; - - [HideInInspector] - public Mesh defaultMesh; - - [HideInInspector] - public Material defaultMeshMaterial; - - [HideInInspector] - public Matrix4x4 defaultTransform; - - public Mesh mesh; - - public Material meshMaterial; - - public Vector3 position; - - public Vector3 rotation; - - public Vector3 scale; - - public LinkMesh() - { - mesh = null; - position = new Vector3(0f, 0f, 0f); - rotation = new Vector3(0f, 0f, 0f); - scale = new Vector3(1f, 1f, 1f); - defaultTransform = default(Matrix4x4); - defaultTransform.SetTRS(position, Quaternion.Euler(rotation), scale); - transform = default(Matrix4x4); - transform.SetTRS(position, Quaternion.Euler(rotation), scale); - } - - public void update() - { - if (mesh == null) - { - mesh = defaultMesh; - transform = defaultTransform; - Quaternion rot; - Utility.MatrixToTRS(transform, out position, out rot, out scale); - rotation = rot.eulerAngles; - } - if (mesh != null) - { - modifiedMesh = UnityEngine.Object.Instantiate(mesh); - } - if (modifiedMesh != null) - { - transform.SetTRS(position, Quaternion.Euler(rotation), scale); - ScaleMesh(); - } - } - - public void ScaleMesh() - { - Vector3[] vertices = modifiedMesh.vertices; - for (int i = 0; i < vertices.Length; i++) - { - Vector3 point = vertices[i]; - point = transform.MultiplyPoint(point); - vertices[i] = point; - } - modifiedMesh.vertices = vertices; - } - - public Mesh getMesh() - { - return modifiedMesh; - } - - public Material getMaterial() - { - return null; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/LinkMesh.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/LinkMesh.cs.meta deleted file mode 100644 index 5a4347280..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/LinkMesh.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 88218b6dac3a1d87d3867523046c804d -timeCreated: 1747788125 -licenseType: Free -MonoImporter: - serializedVersion: 2 - name: - externalObjects: {} - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/PosOri.cs b/Assets/Scripts/ThirdParty/PhysicsTools/PosOri.cs deleted file mode 100644 index 76c910095..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/PosOri.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using UnityEngine; - -namespace PhysicsTools -{ - [Serializable] - public class PosOri - { - public Vector3 pos; - - public Quaternion rot; - - public PosOri(Vector3 p, Quaternion q) - { - pos = p; - rot = q; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/PosOri.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/PosOri.cs.meta deleted file mode 100644 index 0214032f6..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/PosOri.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3b2e47173d3a5c346a9528bef13473eb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Rope.cs b/Assets/Scripts/ThirdParty/PhysicsTools/Rope.cs deleted file mode 100644 index 831757d06..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Rope.cs +++ /dev/null @@ -1,1512 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Rendering; - -namespace PhysicsTools -{ - [RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] - public class Rope : MonoBehaviour - { - public enum RopeGameplayType - { - NORMAL = 0, - ICE = 1, - FLOAT = 2 - } - - [Serializable] - public enum LOGGING - { - NONE = 0, - INFO = 1, - DEBUG = 2 - } - - [Serializable] - public enum RopeType - { - Procedural = 0, - FromBones = 1 - } - - [Serializable] - public enum RendererType - { - None = 0, - Continuous = 1, - Segment = 2 - } - - public delegate void BrokenHandler(object sender); - - public delegate void CreateHandler(object sender); - - public delegate void DeleteHandler(object sender); - - public RopeGameplayType ropeGameplayType; - - private List prevControlPoints = new List(); - - private bool prevKinematic = true; - - private bool prevHideChildren = true; - - private RendererType prevRendererType = RendererType.Continuous; - - public bool startJointSpringy; - - public SerializedSoftJointLimitSpring startJtSpring; - - public bool endJointSpringy; - - public SerializedSoftJointLimitSpring endJtSpring; - - private string prevStrStaticBones; - - public string strStaticBones; - - private HashSet staticBones = new HashSet(); - - public PhysicsMaterial ropeMaterial; - - private GameObject springHolder; - - private Joint springJoint; - - [HideInInspector] public List lstComponentsCreated = new List(); - - public bool HideChildren = true; - - public LOGGING loggingType = LOGGING.INFO; - - public RopeType ropeType; - - public int numControlPoints = 2; - - public List controlPoints = new List(); - - public Transform startPosition; - - public float rate; - - [Range(0f, 10f)] public float gravity = 1f; - - public bool kinematic = true; - - private GameObject prevFirstBone; - - private GameObject prevLastBone; - - public GameObject firstBone; - - public GameObject lastBone; - - public bool sendRopeEvents; - - public RendererType rendererType = RendererType.Continuous; - - public LinkMesh linkMesh = new LinkMesh(); - - public Material continuousMaterial; - - public MeshRenderer meshRenderer; - - public MeshFilter meshFilter; - - public bool useColliders = true; - - public float radiusFactor = 1f; - - public float segmentBordersScaleFactor = 1f; - - public bool useSegmentBordersOffset; - - public SegmentProperties.Type segPropertyType; - - public SegmentPropertiesBox segPropertiesBox = new SegmentPropertiesBox(); - - public SegmentPropertiesCylinder segPropertiesCylinder = new SegmentPropertiesCylinder(); - - public JointProperties jointProp = new JointProperties(); - - private int initialNumSegemnts; - - public List lstSegments = new List(); - - private Mesh mesh; - - private Vector3[] vertexBuffer; - - private Vector2[] uv; - - private int[] indexBuffer; - - private Vector4[] tangents; - - public float totalLengthGet; - - public float tensionGet; - - public float totalLength; - - public float totalLengthColliders; - - public float ropeStretchThreshold = -1f; - - public float textureLength = 0.33f; - - private int numCirclePt = 3; - - public event BrokenHandler Broken; - - public event CreateHandler Created; - - public event DeleteHandler Deleted; - - public void setStartJointSpring(SoftJointLimitSpring sp) - { - startJtSpring = (SerializedSoftJointLimitSpring)sp; - if (springJoint != null) - { - ConfigurableJoint configurableJoint = (ConfigurableJoint)springJoint.joint; - if (configurableJoint != null) - { - configurableJoint.linearLimitSpring = getStartJtSpring(); - SoftJointLimit linearLimit = default(SoftJointLimit); - linearLimit.limit = 0.01f; - configurableJoint.linearLimit = linearLimit; - } - } - } - - public void setEndJointSpring(SoftJointLimitSpring sp) - { - endJtSpring = (SerializedSoftJointLimitSpring)sp; - if (lstSegments.Count != 0) - { - ConfigurableJoint configurableJoint = ((lstSegments[lstSegments.Count - 1].next == null) - ? null - : ((ConfigurableJoint)lstSegments[lstSegments.Count - 1].next.joint)); - if (configurableJoint != null) - { - configurableJoint.linearLimitSpring = getEndJtSpring(); - SoftJointLimit linearLimit = default(SoftJointLimit); - linearLimit.limit = 0.01f; - configurableJoint.linearLimit = linearLimit; - } - } - } - - public SegmentPropertiesBase getSegmentProperties() - { - switch (segPropertyType) - { - case SegmentProperties.Type.BOX: - return segPropertiesBox; - case SegmentProperties.Type.CYLINDER: - return segPropertiesCylinder; - default: - return segPropertiesCylinder; - } - } - - public void setPhysicsMaterial(PhysicsMaterial mat) - { - foreach (Segment lstSegment in lstSegments) - { - lstSegment.capsuleCollider.sharedMaterial = mat; - } - } - - private void Debug(string msg, LOGGING type) - { - if (type <= loggingType) - { - UnityEngine.Debug.Log(msg, this); - } - } - - private void OnJointBreak(float breakForce) - { - if (sendRopeEvents && this.Broken != null) - { - this.Broken(this); - } - } - - public void setContinuousMaterialMapping(float f) - { - textureLength = f; - } - - public void setFirstBone(GameObject bone) - { - firstBone = bone; - } - - public void setLastBone(GameObject bone) - { - lastBone = bone; - } - - public List getSegments() - { - return lstSegments; - } - - public void setStaticBoneList(string str) - { - staticBones.Clear(); - str.Trim(); - if (str != string.Empty) - { - string[] array = str.Split(','); - string[] array2 = array; - foreach (string text in array2) - { - string[] array3 = text.Split('-'); - if (array3.Length == 1) - { - staticBones.Add(int.Parse(array3[0])); - } - else if (array3.Length == 2) - { - int num = int.Parse(array3[0]); - int num2 = int.Parse(array3[1]); - for (int j = num; j <= num2; j++) - { - staticBones.Add(j); - } - } - } - } - - strStaticBones = str; - prevStrStaticBones = str; - } - - public bool setControlPoints(List lstControlPoints) - { - if (numControlPoints < 2 && ropeType == RopeType.Procedural) - { - throw new ArgumentException("Control points should be more than 1"); - } - - bool flag = false; - if (numControlPoints != lstControlPoints.Count) - { - while (lstControlPoints.Count < numControlPoints) - { - lstControlPoints.Add(new ControlPoint()); - } - - while (lstControlPoints.Count > numControlPoints) - { - lstControlPoints.RemoveAt(lstControlPoints.Count - 1); - } - - flag = true; - } - - for (int i = 0; i < lstControlPoints.Count; i++) - { - if (i < prevControlPoints.Count && !lstControlPoints[i].compare(prevControlPoints[i])) - { - flag = true; - break; - } - } - - prevControlPoints.Clear(); - for (int j = 0; j < lstControlPoints.Count; j++) - { - prevControlPoints.Add(lstControlPoints[j].clone()); - } - - if (flag) - { - controlPoints.Clear(); - for (int k = 0; k < prevControlPoints.Count; k++) - { - controlPoints.Add(prevControlPoints[k].clone()); - } - } - - numControlPoints = lstControlPoints.Count; - return flag; - } - - public SoftJointLimitSpring getStartJtSpring() - { - SoftJointLimitSpring result = default(SoftJointLimitSpring); - if (startJointSpringy) - { - result.spring = startJtSpring.spring; - result.damper = startJtSpring.damper; - } - else - { - float spring = (result.damper = 0f); - result.spring = spring; - } - - return result; - } - - public SoftJointLimitSpring getEndJtSpring() - { - SoftJointLimitSpring result = default(SoftJointLimitSpring); - if (endJointSpringy) - { - result.spring = endJtSpring.spring; - result.damper = endJtSpring.damper; - } - else - { - float spring = (result.damper = 0f); - result.spring = spring; - } - - return result; - } - - public void RefreshJointSpring() - { - setStartJointSpring(startJtSpring); - setEndJointSpring(endJtSpring); - } - - public void RefreshProperties(bool bForce) - { - Debug("Refreshing Properties Force = " + bForce, LOGGING.INFO); - bool flag = bForce; - if (numControlPoints < 2) - { - numControlPoints = 2; - } - - bool flag2 = setControlPoints(controlPoints); - flag = flag || flag2; - if (prevStrStaticBones != strStaticBones) - { - setStaticBoneList(strStaticBones); - flag = true; - } - - if (flag) - { - regenerateRope(true); - } - - if (prevHideChildren != HideChildren) - { - HideChildrenObjects(HideChildren); - } - - if (prevKinematic != kinematic) - { - changeToKinematic(kinematic); - } - - if (prevRendererType != rendererType) - { - setRendererType(rendererType); - } - - linkMesh.update(); - setLinkMesh(linkMesh); - if (rendererType == RendererType.Continuous) - { - generateOverallMesh(); - } - - Debug("Refreshing Properties Done", LOGGING.INFO); - } - - public void setBreakingForce(float force) - { - Debug("Setting breaking force to " + force, LOGGING.INFO); - foreach (Segment lstSegment in lstSegments) - { - if (lstSegment.next != null) - { - if (force != 0f) - { - lstSegment.next.joint.breakForce = force; - } - else - { - lstSegment.next.joint.breakForce = 1E+10f; - } - } - } - - jointProp.breakingForce = force; - Debug("Setting breaking force done", LOGGING.INFO); - } - - public void setRendererType(RendererType rType) - { - Debug("Setting Renderer Type to " + rType, LOGGING.INFO); - switch (rType) - { - case RendererType.Continuous: - enableRendering(true); - enableSegmentRendering(false); - break; - case RendererType.Segment: - enableRendering(false); - enableSegmentRendering(true); - break; - case RendererType.None: - enableRendering(false); - enableSegmentRendering(false); - break; - } - - rendererType = rType; - prevRendererType = rType; - } - - public void setLinkMesh(LinkMesh lMesh) - { - if (lMesh != null && lMesh.getMesh() != null) - { - foreach (Segment lstSegment in lstSegments) - { - lstSegment.meshFilter.sharedMesh = lMesh.getMesh(); - lstSegment.meshRenderer.sharedMaterial = lMesh.meshMaterial; - } - } - - linkMesh = lMesh; - } - - public void applyGravity(float f) - { - if (f == -1f) - { - return; - } - - foreach (Segment lstSegment in lstSegments) - { - lstSegment.body.AddForce((0f - (1f - f)) * lstSegment.body.mass * Physics.gravity); - } - } - - public void updateMass(float m) - { - getSegmentProperties().massPerUnitLength = m; - float mass = getSegmentProperties().massPerUnitLength * getSegmentProperties().length; - foreach (Segment lstSegment in lstSegments) - { - lstSegment.body.mass = mass; - } - } - - private void HideChildrenObjects(bool bHide) - { - foreach (Segment lstSegment in lstSegments) - { - if (bHide) - { - lstSegment.seg.hideFlags = HideFlags.HideInHierarchy; - } - else - { - lstSegment.seg.hideFlags = HideFlags.None; - } - } - - prevHideChildren = bHide; - } - - public List> getTrajectory() - { - List> list = new List>(); - float num = segmentBordersScaleFactor; - float num2 = ((!useSegmentBordersOffset || lstSegments.Count <= 0) - ? 0f - : lstSegments[0].capsuleCollider.radius); - num2 *= num; - float num3 = 1f; - int num4 = lstSegments.Count; - // if (num4 > 30 && GameController.Instance.useFastRopeDraw) - if (num4 > 30) - { - num4 = 30; - } - - List list2 = new List(); - int num5 = 0; - if (lstSegments.Count > 0) - { - foreach (Segment lstSegment in lstSegments) - { - if (list2.Count == 0) - { - PosOri posOri = - new PosOri( - lstSegment.seg.transform.TransformPoint(new Vector3(0f, - 0f - getSegmentProperties().length - num2, 0f)), lstSegment.seg.transform.rotation); - posOri.pos = startPosition.position; - list2.Add(posOri); - } - - PosOri item = new PosOri(lstSegment.seg.transform.position, lstSegment.seg.transform.rotation); - list2.Add(item); - if (lstSegment.next == null && num5 < num4 - 1) - { - PosOri item2 = - new PosOri( - lstSegment.seg.transform.TransformPoint(new Vector3(0f, - getSegmentProperties().length * num3, 0f)), lstSegment.seg.transform.rotation); - list2.Add(item2); - list.Add(list2); - list2 = new List(); - } - - num5++; - if (num5 > num4) - { - break; - } - } - - PosOri item3 = - new PosOri( - lstSegments[Mathf.Min(num4, lstSegments.Count) - 1].seg.transform - .TransformPoint(new Vector3(0f, getSegmentProperties().length + num2, 0f)), - lstSegments[0].seg.transform.rotation); - list2.Add(item3); - } - - list.Add(list2); - return list; - } - - private void generateMeshForTrajectory(List trajectory, Bezier interpolator, float totalLen, - ref float lengthCovered, ref int lastVertId, ref int lastIndexID) - { - float num = ((segPropertyType != 0) ? segPropertiesBox.width : segPropertiesCylinder.radius); - num *= radiusFactor; - float num2 = 6.28318f / (float)numCirclePt; - Vector3[] array = new Vector3[numCirclePt]; - Vector3[] array2 = new Vector3[numCirclePt]; - for (int i = 0; i < numCirclePt; i++) - { - array[i] = new Vector3((float)((double)num * Math.Cos((float)i * num2)), 0f, - (float)((double)num * Math.Sin((float)i * num2))); - array2[i] = new Vector3((float)((double)(0f - num) * Math.Sin((float)i * num2)), 0f, - (float)((double)num * Math.Cos((float)i * num2))); - array2[i].Normalize(); - } - - int num3 = lastVertId; - Vector3 v = new Vector3(0f, 0f, 1f); - Vector3 vector = new Vector3(1f, 1f, 1f); - Vector3 vector2 = new Vector3(0.3f, 1f, 0.3f); - Vector3 s = new Vector3(0.2f, 1f, 0.2f); - float num4 = 0f; - Vector3 vector3 = trajectory[0].pos; - int num5 = trajectory.Count * 4; - float deltaLen = totalLen / (float)(num5 - 1); - for (int j = 0; j < num5; j++) - { - Vector3 vector4 = ((j != 0) ? interpolator.getNext(deltaLen).pos : trajectory[0].pos); - if (j != 0) - { - v = vector4 - vector3; - v.Normalize(); - } - else if (j == 0 && trajectory.Count > 1) - { - v = trajectory[1].pos - vector4; - v.Normalize(); - } - - Vector3 vector5 = vector4 - vector3; - vector3 = vector4; - Matrix4x4 matrix4x = default(Matrix4x4); - for (int k = 0; k < numCirclePt; k++) - { - Quaternion q = Utility.createOrientation(v); - // if (GameController.Instance.fishingPlayer.currentHands.fishingLine.lineType == - // FishingLine.LineType.FLY && j >= num5 - 8) - // { - // matrix4x.SetTRS(vector4, q, s); - // } - // else - { - matrix4x.SetTRS(vector4, q, (!(vector4.y < 0f)) ? vector : vector2); - } - - vertexBuffer[num3] = base.transform.InverseTransformPoint(matrix4x.MultiplyPoint(array[k])); - if (j == 0) - { - } - - Vector3 vector6 = base.transform.InverseTransformDirection(matrix4x.MultiplyVector(array2[k])); - tangents[num3] = new Vector4(vector6.x, vector6.y, vector6.z, -1f); - if (j == 1) - { - } - - uv[num3] = new Vector2((float)k * 1f / (float)numCirclePt, (totalLen - num4) / textureLength); - num3++; - } - - num4 += vector5.magnitude; - } - - if (true) - { - int num6 = lastIndexID; - for (int l = 0; l < num5 - 1; l++) - { - for (int m = 0; m < numCirclePt; m++) - { - int num7 = l + lastVertId / numCirclePt; - indexBuffer[num6++] = num7 * numCirclePt + m; - indexBuffer[num6++] = (num7 + 1) * numCirclePt + m; - indexBuffer[num6++] = num7 * numCirclePt + (m + 1) % numCirclePt; - indexBuffer[num6++] = num7 * numCirclePt + (m + 1) % numCirclePt; - indexBuffer[num6++] = (num7 + 1) * numCirclePt + m; - indexBuffer[num6++] = (num7 + 1) * numCirclePt + (m + 1) % numCirclePt; - } - } - - lastIndexID = num6; - } - - lengthCovered += num4; - lastVertId = num3; - } - - public void generateOverallMesh() - { - // if ((bool)GameController.Instance.fishingPlayer && GameController.Instance.optimalRopeGenerator && - // ((GameController.Instance.fishingPlayer.currentHands.fakeStraightLine.enabled && - // ropeGameplayType != RopeGameplayType.FLOAT) || - // GameController.Instance.fishingPlayer.underwaterCamera.isTurnedOn)) - // { - // return; - // } - - List> trajectory = getTrajectory(); - if (trajectory[0].Count <= 0) - { - return; - } - - int num = 0; - int num2 = 0; - bool flag = false; - foreach (List item in trajectory) - { - int num3 = item.Count * 4; - num += num3; - num2 += (num3 - 1) * (numCirclePt * 2); - } - - int num4 = numCirclePt * num; - if (vertexBuffer == null || num4 != vertexBuffer.Length) - { - flag = vertexBuffer == null || num4 > vertexBuffer.Length; - vertexBuffer = new Vector3[num4]; - tangents = new Vector4[num4]; - uv = new Vector2[num4]; - } - - if (indexBuffer == null || num2 * 3 != indexBuffer.Length) - { - indexBuffer = new int[num2 * 3]; - } - - int lastVertId = 0; - int lastIndexID = 0; - List list = new List(); - float num5 = 0f; - foreach (List item2 in trajectory) - { - list.Add(new Bezier(item2)); - num5 += list[list.Count - 1].TotalLength(); - } - - float lengthCovered = 0f; - for (int i = 0; i < trajectory.Count; i++) - { - generateMeshForTrajectory(trajectory[i], list[i], num5, ref lengthCovered, ref lastVertId, - ref lastIndexID); - } - - if (mesh == null) - { - mesh = new Mesh(); - } - - if (flag) - { - mesh.vertices = vertexBuffer; - mesh.triangles = indexBuffer; - } - else - { - mesh.triangles = indexBuffer; - mesh.vertices = vertexBuffer; - } - - mesh.uv = uv; - mesh.RecalculateNormals(); - mesh.tangents = tangents; - meshFilter.sharedMesh = mesh; - meshRenderer.sharedMaterial = continuousMaterial; - mesh.bounds = new Bounds(base.transform.position, new Vector3(10000f, 10000f, 10000f)); - } - - public void regenerateRope(bool bDestroyImmediate) - { - deleteRope(bDestroyImmediate); - generateCatnaryRope(controlPoints.ToArray()); - setLinkMesh(linkMesh); - initialNumSegemnts = lstSegments.Count; - } - - public void generateRope(ControlPoint[] arrPoints) - { - bool flag = false; - List list = new List(arrPoints.Length); - for (int i = 0; i < arrPoints.Length; i++) - { - list.Add(arrPoints[i].localPos); - if (arrPoints[i].obj != null) - { - list[i] = arrPoints[i].obj.transform.TransformPoint(arrPoints[i].localPos); - } - else - { - list[i] = ((!flag) - ? base.gameObject.transform.TransformPoint(arrPoints[i].localPos) - : arrPoints[i].localPos); - } - } - - SCapsulePos sCapsulePos = new SCapsulePos(); - bool flag2 = false; - int last = 0; - bool flag3 = false; - Segment segment = null; - Quaternion quaternion = Quaternion.identity; - Quaternion quaternion2 = Quaternion.AngleAxis(jointProp.twistOffsetDeg, new Vector3(0f, 1f, 0f)); - totalLength = 0f; - Vector3 vector = list[0]; - int num = 0; - while (!flag2) - { - int num2 = last; - flag2 = getNextCapsulePos(sCapsulePos, list, ref last, getSegmentProperties(), jointProp, false); - Segment segment2 = null; - if (sCapsulePos.fLen > 0f) - { - segment2 = createSegment(sCapsulePos.fLen, sCapsulePos.vPos, sCapsulePos.vDir); - if (useColliders && num >= 0) - { - if ((bool)segment2.capsuleCollider) - { - segment2.capsuleCollider.enabled = true; - } - - num = 0; - } - else - { - if ((bool)segment2.capsuleCollider) - { - segment2.capsuleCollider.enabled = false; - } - - num++; - } - - lstSegments.Add(segment2); - if (segment != null) - { - totalLength += (sCapsulePos.vPos - vector).magnitude; - vector = sCapsulePos.vPos; - segment.next = createSegmentJoint(segment, segment2, quaternion); - segment2.prev = segment.next; - } - - GameObject gameObject = null; - Vector3 vector2 = new Vector3(0f, 0f, 0f); - bool flag4 = false; - if (!flag3 && num2 == 0) - { - if (arrPoints[num2].attached) - { - gameObject = arrPoints[num2].obj; - vector2 = arrPoints[num2].localPos; - flag4 = true; - } - } - else if (num2 != last && last < arrPoints.Length && arrPoints[last].attached) - { - gameObject = arrPoints[last].obj; - vector2 = arrPoints[last].localPos; - flag4 = true; - } - - if (flag4) - { - vector2 = ((gameObject != null) - ? gameObject.transform.TransformPoint(vector2) - : ((!flag) ? base.gameObject.transform.TransformPoint(vector2) : vector2)); - int jtPos = -1; - Joint prev = new Joint(segment2.seg, gameObject, vector2, - segment2.seg.transform.TransformDirection(0f, 1f, 0f), jointProp, this, jtPos); - if (num2 == 0) - { - segment2.prev = prev; - } - - flag3 = true; - } - - segment = segment2; - quaternion = quaternion2 * quaternion; - } - else - { - flag2 = true; - } - } - - if (lstSegments.Count == 1) - { - GameObject obj = arrPoints[last].obj; - Vector3 localPos = arrPoints[last].localPos; - int jtPos2 = -1; - Segment segment3 = lstSegments[0]; - Joint prev2 = new Joint(segment3.seg, obj, localPos, - segment3.seg.transform.TransformDirection(0f, 1f, 0f), jointProp, this, jtPos2); - segment3.prev = prev2; - } - - if (lstSegments.Count > 0 && !lstSegments[lstSegments.Count - 1].seg.GetComponent()) - { - GameObject obj2 = arrPoints[last].obj; - Vector3 localPos2 = arrPoints[last].localPos; - int jtPos3 = -1; - Segment segment4 = lstSegments[lstSegments.Count - 1]; - Joint joint = new Joint(segment4.seg, obj2, localPos2, - segment4.seg.transform.TransformDirection(0f, 1f, 0f), jointProp, this, jtPos3); - } - - if (sendRopeEvents && this.Created != null) - { - this.Created(this); - } - } - - public void generateCatnaryRope(ControlPoint[] arrPoints) - { - Debug("Generating Catenary Rope " + arrPoints.ToString(), LOGGING.INFO); - if (arrPoints.Length < 2) - { - return; - } - - List list = new List(); - Vector3 vector = ((!(arrPoints[0].obj != null)) - ? arrPoints[0].localPos - : arrPoints[0].obj.transform.TransformPoint(arrPoints[0].localPos)); - list.Add(arrPoints[0]); - for (int i = 1; i < arrPoints.Length; i++) - { - Vector3 vector2 = ((!(arrPoints[i].obj != null)) - ? arrPoints[i].localPos - : arrPoints[i].obj.transform.TransformPoint(arrPoints[i].localPos)); - ControlPoint controlPoint = arrPoints[i - 1]; - if (controlPoint.slackFraction > 1f) - { - float magnitude = (vector2 - vector).magnitude; - SegmentPropertiesBase segmentProperties = getSegmentProperties(); - List catenaryPts = Utility.getCatenaryPts(vector, vector2, - magnitude * controlPoint.slackFraction, (int)(magnitude / segmentProperties.length)); - for (int j = 1; j < catenaryPts.Count; j++) - { - ControlPoint controlPoint2 = new ControlPoint(); - controlPoint2.attached = false; - controlPoint2.obj = null; - controlPoint2.localPos = catenaryPts[j]; - if (j == catenaryPts.Count - 1) - { - controlPoint2.attached = arrPoints[i].attached; - controlPoint2.obj = arrPoints[i].obj; - controlPoint2.localPos = ((!(controlPoint2.obj != null)) - ? controlPoint2.localPos - : controlPoint2.obj.transform.InverseTransformPoint(controlPoint2.localPos)); - } - - list.Add(controlPoint2); - } - } - else - { - list.Add(arrPoints[i]); - } - - vector = vector2; - } - - generateRope(list.ToArray()); - Debug("Generating Catenary Rope done", LOGGING.INFO); - } - - public void deleteRope(bool bDestroyImmediate) - { - if (lstSegments != null) - { - foreach (Segment lstSegment in lstSegments) - { - if (bDestroyImmediate) - { - UnityEngine.Object.DestroyImmediate(lstSegment.seg); - } - else - { - UnityEngine.Object.Destroy(lstSegment.seg); - } - } - - lstSegments.Clear(); - } - - if (springJoint != null) - { - UnityEngine.Object.Destroy(springJoint.joint); - } - - if (springHolder != null) - { - UnityEngine.Object.Destroy(springHolder); - } - - if (bDestroyImmediate) - { - clearOrphan(); - } - - if (sendRopeEvents && this.Deleted != null) - { - this.Deleted(this); - } - } - - public float getLength() - { - return totalLength; - } - - public float getLengthColliders() - { - return totalLengthColliders; - } - - public float getTension() - { - if (springJoint != null && springJoint.joint != null) - { - ConfigurableJoint configurableJoint = (ConfigurableJoint)springJoint.joint; - Vector3 vector = configurableJoint.connectedAnchor; - Rigidbody connectedBody = configurableJoint.connectedBody; - Vector3 vector2 = configurableJoint.anchor; - Rigidbody body = lstSegments[0].body; - if (connectedBody != null) - { - vector = connectedBody.transform.TransformPoint(vector); - } - - if (body != null) - { - vector2 = body.transform.TransformPoint(vector2); - } - - float num = (vector - vector2).magnitude - 0.01f; - return num * configurableJoint.linearLimitSpring.spring; - } - - if (lstSegments.Count > 0 && lstSegments[0].prev != null) - { - UnityEngine.Joint joint = lstSegments[0].prev.joint; - Vector3 vector3 = joint.connectedAnchor; - Rigidbody connectedBody2 = joint.connectedBody; - Vector3 vector4 = joint.anchor; - Rigidbody body2 = lstSegments[0].body; - if (connectedBody2 != null) - { - vector3 = connectedBody2.transform.TransformPoint(vector3); - } - - if (body2 != null) - { - vector4 = body2.transform.TransformPoint(vector4); - } - - float num2 = (vector3 - vector4).magnitude - 0.01f; - return num2 * ((ConfigurableJoint)joint).linearLimitSpring.spring; - } - - return 0f; - } - - public void breakRope(float fraction) - { - Debug("Breaking Rope from Fraction: " + fraction, LOGGING.INFO); - int num = (int)((float)lstSegments.Count * fraction); - if (num < lstSegments.Count - 1 && num >= 0) - { - Debug("Breaking Rope from segment: " + num, LOGGING.DEBUG); - if (lstSegments[num].next != null) - { - UnityEngine.Object.Destroy(lstSegments[num].next.joint); - lstSegments[num].next = null; - lstSegments[num + 1].prev = null; - } - } - - Debug("Breaking Rope done", LOGGING.INFO); - } - - public void setLength(float newLength) - { - newLength -= getLength(); - changeLength(newLength); - } - - public void changeLength(float deltaLen) - { - if (lstSegments.Count < 1 || deltaLen == 0f) - { - CalculateTotalLength(); - return; - } - - deltaLen *= 0.5f; - int num = 0; - Segment segment = lstSegments[num]; - SegmentPropertiesBase segmentProperties = getSegmentProperties(); - Vector3 localScale = segment.seg.transform.localScale; - if (localScale.y > 0f) - { - localScale.y += deltaLen; - } - - if (localScale.y < 0.01f) - { - localScale.y = 0.01f; - } - - float num2 = 0.5f; - float num3 = 1f; - float num4 = 0f; - float num5 = 0f; - float num6 = segmentProperties.length * num2; - num5 = ((SegmentPropertiesCylinder)segmentProperties).radius * 2f; - if (localScale.y > (segmentProperties.length + num5) * num2) - { - Vector3 localScale2 = segment.seg.transform.localScale; - localScale2.y = num6; - segment.seg.transform.localScale = localScale2; - float num7 = 0f; - for (deltaLen = 0f - segmentProperties.length + localScale.y / num2; deltaLen > 0f; deltaLen -= num7) - { - num7 = Mathf.Clamp(deltaLen, 0.01f, num6); - segment.seg.transform.position += segment.seg.transform.TransformDirection(0f, 1f, 0f) * num7; - if (segment.next != null) - { - if (segment.next.joint.connectedBody != segment.body) - { - segment.next.joint.anchor = new Vector3(0f, (1f - jointProp.offsetScale) * num3, 0f); - } - else - { - segment.next.joint.connectedAnchor = - new Vector3(0f, (1f - jointProp.offsetScale) * num3, 0f); - } - } - - Vector3 pos = segment.seg.transform.position - - segment.seg.transform.TransformDirection(0f, 1f, 0f) * - (num7 + segmentProperties.length / 2f); - Segment segment2 = createSegment(num7 * 2f, pos, - segment.seg.transform.TransformDirection(0f, 1f, 0f)); - float num8 = jointProp.twistOffsetDeg * (float)(-1 + (initialNumSegemnts - lstSegments.Count)); - num8 = (num8 + 36000f) % 360f; - Quaternion quaternion = Quaternion.AngleAxis(num8, new Vector3(0f, 1f, 0f)); - segment2.seg.transform.rotation = segment2.seg.transform.rotation * quaternion; - Rigidbody connectedBody = segment.prev.joint.connectedBody; - Vector3 connectedAnchor = segment.prev.joint.connectedAnchor; - Vector3 vGlobalAnchor = ((!connectedBody) - ? connectedAnchor - : connectedBody.transform.TransformPoint(connectedAnchor)); - Joint prev = new Joint(segment2.seg, (!connectedBody) ? null : connectedBody.gameObject, - vGlobalAnchor, segment2.seg.transform.TransformDirection(0f, 1f, 0f), jointProp, this, -1); - segment2.prev = prev; - Joint prev2 = (segment2.next = new Joint(segment2, segment, jointProp, getSegmentProperties(), - Quaternion.identity)); - Joint prev3 = segment.prev; - segment.prev = prev2; - lstSegments.Insert(0, segment2); - UnityEngine.Object.Destroy(prev3.joint); - FixAnchors(segment2, num3); - segment = segment2; - } - - CalculateTotalLength(); - } - else if (localScale.y < num5 * num2) - { - while (deltaLen < 0f) - { - if (lstSegments.Count < num + 1 + 1) - { - UnityEngine.Debug.LogError("!!! changeLength lstSegments size error index !!!: " + num); - // if (GameController.Instance.fishingPlayer.currentState == FishingPlayer.PlayerState.FISHING || - // GameController.Instance.fishingPlayer.currentState == FishingPlayer.PlayerState.ICE_FISHING) - // { - // GameController.Instance.fishingPlayer.LineBreak( - // Utilities.GetTranslation("HUD_MESSAGE/LINE_BROKE_TENSION"), 0f); - // } - - return; - } - - Segment segment3 = lstSegments[num + 1]; - Vector3 localScale3 = segment3.seg.transform.localScale; - localScale3.y = num6; - segment3.seg.transform.localScale = localScale3; - segment.seg.transform.position += - segment.seg.transform.TransformDirection(0f, -1f, 0f) * localScale.y / num2; - Vector3 connectedAnchor2 = segment.prev.joint.connectedAnchor; - Rigidbody connectedBody2 = segment.prev.joint.connectedBody; - Vector3 vGlobalAnchor2 = ((!connectedBody2) - ? connectedAnchor2 - : connectedBody2.transform.TransformPoint(connectedAnchor2)); - Joint prev4 = new Joint(segment3.seg, (!connectedBody2) ? null : connectedBody2.gameObject, - vGlobalAnchor2, segment3.seg.transform.TransformDirection(0f, 1f, 0f), jointProp, this, -1); - segment3.prev = prev4; - deltaLen += segment.seg.transform.localScale.y; - lstSegments.Remove(segment); - UnityEngine.Object.Destroy(segment.seg); - FixAnchors(segment3, num3); - segment = segment3; - if (!(deltaLen < 0f)) - { - } - } - - CalculateTotalLength(); - } - else - { - segment.seg.transform.localScale = localScale; - FixAnchors(segment, num3); - CalculateTotalLength(); - } - } - - public void FixAnchors(Segment seg, float anchorMult) - { - Joint prev = seg.prev; - Joint next = seg.next; - if (prev != null) - { - if (prev.joint.connectedBody != seg.body) - { - prev.joint.anchor = new Vector3(0f, (-1f + jointProp.offsetScale) * anchorMult, 0f); - } - else - { - prev.joint.connectedAnchor = new Vector3(0f, (-1f + jointProp.offsetScale) * anchorMult, 0f); - } - } - - if (next != null) - { - if (next.joint.connectedBody != seg.body) - { - next.joint.anchor = new Vector3(0f, (1f - jointProp.offsetScale) * anchorMult, 0f); - } - else - { - next.joint.connectedAnchor = new Vector3(0f, (1f - jointProp.offsetScale) * anchorMult, 0f); - } - } - } - - private void clearOrphan() - { - Debug("Clear Orphan", LOGGING.INFO); - if (lstComponentsCreated != null) - { - foreach (UnityEngine.Object item in lstComponentsCreated) - { - UnityEngine.Object.DestroyImmediate(item); - } - - lstComponentsCreated.Clear(); - } - - Debug("Clear Orphan done", LOGGING.INFO); - } - - private void OnEnable() - { - } - - private void Awake() - { - meshRenderer = GetComponent(); - meshFilter = GetComponent(); - if (startPosition == null && (bool)controlPoints[0].obj) - { - startPosition = controlPoints[0].obj.transform; - } - - List list = new List(); - for (int i = 0; i < base.transform.childCount; i++) - { - if (base.transform.GetChild(i).name.Contains("__rope__")) - { - list.Add(base.transform.GetChild(i).gameObject); - } - } - - foreach (GameObject item in list) - { - UnityEngine.Object.Destroy(item); - } - - lstSegments = new List(); - if (ropeType == RopeType.FromBones) - { - rendererType = RendererType.None; - } - - regenerateRope(true); - setRendererType(rendererType); - } - - private void Start() - { - } - - private void FixedUpdate() - { - changeLength(rate); - if (gravity != -1f) - { - applyGravity(gravity); - } - } - - private void LateUpdate() - { - generateOverallMesh(); - } - - private void checkBrokenJoints() - { - foreach (Segment lstSegment in lstSegments) - { - if (lstSegment.prev != null && lstSegment.prev.joint == null) - { - lstSegment.prev = null; - } - - if (lstSegment.next != null && lstSegment.next.joint == null) - { - lstSegment.next = null; - } - } - } - - private void checkStabilization() - { - foreach (Segment lstSegment in lstSegments) - { - float num = lstSegment.body.linearVelocity.sqrMagnitude * lstSegment.body.mass + - lstSegment.body.inertiaTensor.magnitude * lstSegment.body.angularVelocity.sqrMagnitude; - if (num > lstSegment.body.mass * 25f) - { - lstSegment.body.linearVelocity = new Vector3(0f, 0f, 0f); - lstSegment.body.angularVelocity = new Vector3(0f, 0f, 0f); - } - } - } - - public void changeToKinematic(bool b) - { - int num = 0; - foreach (Segment lstSegment in lstSegments) - { - if (ropeType == RopeType.Procedural || (ropeType == RopeType.FromBones && !staticBones.Contains(num))) - { - lstSegment.body.isKinematic = b; - } - - num++; - } - - kinematic = b; - prevKinematic = b; - } - - private void enableRendering(bool b) - { - Debug("Enable Rendering " + b, LOGGING.INFO); - meshRenderer.enabled = b; - Debug("Enable Rendering done", LOGGING.INFO); - } - - private void enableSegmentRendering(bool b) - { - Debug("Enable Segment Rendering " + b, LOGGING.INFO); - foreach (Segment lstSegment in lstSegments) - { - lstSegment.meshRenderer.enabled = b; - } - - Debug("Enable Segment Rendering done", LOGGING.INFO); - } - - private bool getNextCapsulePos(SCapsulePos capPose, List vecPts, ref int last, - SegmentPropertiesBase segProp, JointProperties jointProp, bool bExtraSegPosAtStart) - { - capPose.vPrevPos = capPose.vPos; - capPose.vPrevDir = capPose.vDir; - if (bExtraSegPosAtStart) - { - capPose.vPos += capPose.vDir * capPose.fLen * (1f - jointProp.offsetScale); - capPose.vDir *= -1f; - } - - bool result = false; - if (capPose.vDir.magnitude != 0f) - { - Vector3 vDir = capPose.vDir; - capPose.vPos += vDir * capPose.fLen * (1f - jointProp.offsetScale); - } - else - { - capPose.vPos = vecPts[last]; - } - - int num = last + 1; - if (num < vecPts.Count && num >= 0) - { - Vector3 vDir2 = vecPts[num] - capPose.vPos; - float magnitude = vDir2.magnitude; - vDir2.Normalize(); - float length = segProp.length; - capPose.fLen = length; - capPose.vDir = vDir2; - if (magnitude < segProp.length) - { - last = num; - num = last + 1; - if (last == 0 || last == vecPts.Count - 1) - { - capPose.fLen = magnitude; - result = true; - } - } - } - - if (bExtraSegPosAtStart) - { - capPose.vPos += capPose.vDir * capPose.fLen; - capPose.vDir *= -1f; - } - - return result; - } - - private Segment createBoneSegment(float len, Vector3 pos, Vector3 dir, GameObject bone) - { - Quaternion q = Utility.createOrientation(dir); - BoneSegment boneSegment = new BoneSegment("segment-" + lstSegments.Count + "__rope__", len, - pos + dir * len / 2f, q, getSegmentProperties(), this, bone); - boneSegment.seg.transform.parent = base.gameObject.transform; - return boneSegment; - } - - private Segment createSegment(float len, Vector3 pos, Vector3 dir) - { - Quaternion q = Utility.createOrientation(dir); - Segment segment = new Segment("segment-" + lstSegments.Count + "__rope__", len, pos + dir * len / 2f, q, - getSegmentProperties(), this); - segment.seg.transform.parent = base.gameObject.transform; - // if ((bool)GameController.Instance) - { - segment.meshRenderer.enabled = true; - // segment.meshRenderer.material = GameController.Instance.waterInteractiveMaterial; - segment.meshRenderer.shadowCastingMode = ShadowCastingMode.Off; - } - // else - // { - // segment.meshRenderer.enabled = false; - // } - - if (totalLength <= 105f) - { - // segment.waterInteractive = segment.seg.AddComponent(); - // segment.waterInteractive.Multiplier = 1.5f; - } - - return segment; - } - - private Joint createSegmentJoint(Segment seg1, Segment seg2, Quaternion twistOffset) - { - return new Joint(seg1, seg2, jointProp, getSegmentProperties(), twistOffset); - } - - public void CalculateTotalLength() - { - totalLength = 0f; - totalLengthColliders = 0f; - for (int i = 0; i < lstSegments.Count; i++) - { - totalLengthColliders += - lstSegments[i].seg.transform.localScale.y * lstSegments[i].capsuleCollider.height; - if (i == 0) - { - totalLength += (lstSegments[i].seg.transform.position - controlPoints[0].obj.transform.position) - .magnitude; - } - - if (i == lstSegments.Count - 1) - { - totalLength += (lstSegments[i].seg.transform.position - controlPoints[1].obj.transform.position) - .magnitude; - } - - if (i > 0) - { - totalLength += (lstSegments[i].seg.transform.position - lstSegments[i - 1].seg.transform.position) - .magnitude; - } - } - - if (ropeStretchThreshold > 0f && totalLength - totalLengthColliders > ropeStretchThreshold) - { - regenerateRope(true); - UnityEngine.Debug.LogError("Rope stretch regenerate"); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Rope.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/Rope.cs.meta deleted file mode 100644 index 2d948fc3e..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Rope.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 8d8b3d7293da4ed8736330164944ddd3 -timeCreated: 1747788125 -licenseType: Free -MonoImporter: - serializedVersion: 2 - name: - externalObjects: {} - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SCapsulePos.cs b/Assets/Scripts/ThirdParty/PhysicsTools/SCapsulePos.cs deleted file mode 100644 index b6153e9f1..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SCapsulePos.cs +++ /dev/null @@ -1,26 +0,0 @@ -using UnityEngine; - -namespace PhysicsTools -{ - internal class SCapsulePos - { - public Vector3 vPos; - - public Vector3 vDir; - - public Vector3 vPrevPos; - - public Vector3 vPrevDir; - - public float fLen; - - public SCapsulePos() - { - vPos = new Vector3(0f, 0f, 0f); - vDir = new Vector3(0f, 0f, 0f); - vPrevPos = new Vector3(0f, 0f, 0f); - vPrevDir = new Vector3(0f, 0f, 0f); - fLen = 0f; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SCapsulePos.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/SCapsulePos.cs.meta deleted file mode 100644 index 63e36c32b..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SCapsulePos.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 089e242339d5f784baf45339b1f072ed -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Segment.cs b/Assets/Scripts/ThirdParty/PhysicsTools/Segment.cs deleted file mode 100644 index da4144f59..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Segment.cs +++ /dev/null @@ -1,58 +0,0 @@ -// using UltimateWater; -using UnityEngine; - -namespace PhysicsTools -{ - public class Segment - { - public GameObject seg; - - public Rigidbody body; - - public Joint prev; - - public Joint next; - - public CapsuleCollider capsuleCollider; - - public MeshFilter meshFilter; - - public MeshRenderer meshRenderer; - - // public WaterInteractive waterInteractive; - - public Segment(string name, float len, Vector3 pos, Quaternion q, SegmentPropertiesBase segProperties, Rope r) - { - SegmentPropertiesCylinder segmentPropertiesCylinder = (SegmentPropertiesCylinder)segProperties; - float radius = segmentPropertiesCylinder.radius; - seg = GameObject.CreatePrimitive(PrimitiveType.Cylinder); - capsuleCollider = seg.GetComponent(); - meshFilter = seg.GetComponent(); - meshRenderer = seg.GetComponent(); - body = seg.AddComponent(); - capsuleCollider.sharedMaterial = r.ropeMaterial; - capsuleCollider.enabled = r.useColliders; - r.lstComponentsCreated.Add(seg); - seg.hideFlags = (r.HideChildren ? HideFlags.HideInHierarchy : HideFlags.None); - meshRenderer.enabled = true; - r.linkMesh.defaultMesh = meshFilter.sharedMesh; - r.linkMesh.defaultMeshMaterial = meshRenderer.sharedMaterial; - r.linkMesh.defaultTransform = Matrix4x4.identity; - if (r.linkMesh.getMesh() != null) - { - meshFilter.sharedMesh = r.linkMesh.getMesh(); - meshRenderer.sharedMaterial = r.linkMesh.meshMaterial; - } - seg.name = name; - seg.transform.localScale = new Vector3(radius * 2f, len / 2f, radius * 2f); - seg.transform.localPosition = pos; - seg.transform.localRotation = q; - body.maxAngularVelocity = 1f; - body.angularDamping = segmentPropertiesCylinder.angularDamping; - body.linearDamping = segmentPropertiesCylinder.linearDamping; - body.mass = segmentPropertiesCylinder.massPerUnitLength * segmentPropertiesCylinder.length; - body.solverIterations = segmentPropertiesCylinder.solverCount; - body.isKinematic = r.kinematic; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Segment.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/Segment.cs.meta deleted file mode 100644 index 9f128f1e4..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Segment.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: b876b665f2164469858aa78787017d4d -timeCreated: 1747788127 -licenseType: Free -MonoImporter: - serializedVersion: 2 - name: - externalObjects: {} - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentProperties.cs b/Assets/Scripts/ThirdParty/PhysicsTools/SegmentProperties.cs deleted file mode 100644 index c2661eb68..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentProperties.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; - -namespace PhysicsTools -{ - [Serializable] - public class SegmentProperties - { - [Serializable] - public enum Type - { - CYLINDER = 0, - BOX = 1 - } - - public Type type; - - public SegmentPropertiesBase properties; - - public SegmentProperties() - { - properties = new SegmentPropertiesCylinder(); - type = Type.CYLINDER; - } - - public void setType(Type t) - { - switch (t) - { - case Type.BOX: - properties = new SegmentPropertiesBox(); - break; - case Type.CYLINDER: - properties = new SegmentPropertiesCylinder(); - break; - } - type = t; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentProperties.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/SegmentProperties.cs.meta deleted file mode 100644 index 88f340744..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentProperties.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4bbc2d7df2b1ead41bf1846c6e06b77d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBase.cs b/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBase.cs deleted file mode 100644 index 621c13a0b..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBase.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; - -namespace PhysicsTools -{ - [Serializable] - public class SegmentPropertiesBase - { - public float massPerUnitLength; - - public int solverCount; - - public float length; - - public float linearDamping; - - public float angularDamping; - - public SegmentPropertiesBase() - { - massPerUnitLength = 10f; - solverCount = 255; - length = 1f; - linearDamping = 0.01f; - angularDamping = 0.01f; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBase.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBase.cs.meta deleted file mode 100644 index 464c46453..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9090fbf5485508f41b83439d2c44e9b1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBox.cs b/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBox.cs deleted file mode 100644 index 1a03d069d..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBox.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace PhysicsTools -{ - [Serializable] - public class SegmentPropertiesBox : SegmentPropertiesBase - { - public float width; - - public float height; - - public SegmentPropertiesBox() - { - length = 1f; - width = 0.05f; - height = 0.2f; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBox.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBox.cs.meta deleted file mode 100644 index 0bab88874..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesBox.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dd4b78dfa69ad534c94ee6f13133b5e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesCylinder.cs b/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesCylinder.cs deleted file mode 100644 index 17acf3661..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesCylinder.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace PhysicsTools -{ - [Serializable] - public class SegmentPropertiesCylinder : SegmentPropertiesBase - { - public float radius; - - public SegmentPropertiesCylinder() - { - length = 1f; - radius = 0.1f; - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesCylinder.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesCylinder.cs.meta deleted file mode 100644 index 4416a4fe7..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SegmentPropertiesCylinder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c06432f1a93c1694e97f31bf3112ceb0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SerializedSoftJointLimitSpring.cs b/Assets/Scripts/ThirdParty/PhysicsTools/SerializedSoftJointLimitSpring.cs deleted file mode 100644 index 634bd0938..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SerializedSoftJointLimitSpring.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using UnityEngine; - -namespace PhysicsTools -{ - [Serializable] - public class SerializedSoftJointLimitSpring - { - public float spring = 30000f; - - public float damper = 30000f; - - public SerializedSoftJointLimitSpring() - { - spring = 30000f; - damper = 30000f; - } - - private SerializedSoftJointLimitSpring(SoftJointLimitSpring c) - { - damper = c.damper; - spring = c.spring; - } - - public static implicit operator SoftJointLimitSpring(SerializedSoftJointLimitSpring c) - { - SoftJointLimitSpring result = default(SoftJointLimitSpring); - result.spring = c.spring; - result.damper = c.damper; - return result; - } - - public static explicit operator SerializedSoftJointLimitSpring(SoftJointLimitSpring c) - { - return new SerializedSoftJointLimitSpring(c); - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/SerializedSoftJointLimitSpring.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/SerializedSoftJointLimitSpring.cs.meta deleted file mode 100644 index 91feae635..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/SerializedSoftJointLimitSpring.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: e9f687b18e562c31f90c28822c0f641d -timeCreated: 1747788125 -licenseType: Free -MonoImporter: - serializedVersion: 2 - name: - externalObjects: {} - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Test.meta b/Assets/Scripts/ThirdParty/PhysicsTools/Test.meta deleted file mode 100644 index 99ead37ef..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Test.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 2aeb581d8e0340a7b32560ea8d661608 -timeCreated: 1762030053 \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTest.cs b/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTest.cs deleted file mode 100644 index 3e278f9a4..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTest.cs +++ /dev/null @@ -1,147 +0,0 @@ -using NBC; -using UnityEngine; - -namespace PhysicsTools -{ - public class RopeTest : MonoBehaviour - { - public Rope rope; - - public Transform startPosition; - - public Transform throwPosition; - - public Transform ropeStart; - - public Transform ropeFloat; - - public Transform ropeBait; - - public Transform fishingPlayer; - - public bool updateDistance; - - public float incDist = 0.1f; - - public float incDistThrow = 0.5f; - - public float incDistWater = 0.1f; - - public float maxLength = 25f; - - public Vector3 throwDir = Vector3.zero; - - public float throwForce = 1000f; - - public float prevDistance = -1f; - - public float currentDistance = -1f; - - public float reelInSpeed = 0.01f; - - [HideInInspector] public float reelInFactor; - - private bool hitWater; - - private bool wasThrown; - - public bool hasFish; - - private void Start() - { - prevDistance = (currentDistance = CalculateDistance()); - ResetBait(true); - ropeStart.parent = null; - } - - private void Update() - { - if (hitWater && rope.getLength() < 1f) - { - ResetBait(); - return; - } - - reelInFactor = 0f; - if (Input.GetKey(KeyCode.N)) - { - reelInFactor = reelInSpeed; - } - else if (Input.GetKey(KeyCode.M)) - { - reelInFactor = 0f - reelInSpeed; - } - - if (Input.GetKeyDown(KeyCode.B)) - { - ThrowBait(); - } - - if (Input.GetKeyDown(KeyCode.V)) - { - ResetBait(true); - } - - ReelIn(reelInFactor); - if (!hitWater && ropeStart.position.y <= 0f) - { - incDist = incDistWater; - hitWater = true; - } - - ropeStart.GetComponent().linearDamping = ((!(ropeStart.position.y <= 0f)) ? 0f : 5f); - } - - private void LateUpdate() - { - prevDistance = currentDistance; - currentDistance = CalculateDistance(); - if (updateDistance && (!hitWater || hasFish) && rope.getLength() < maxLength && wasThrown && - rope.getLength() < currentDistance + incDist) - { - rope.changeLength(currentDistance - rope.getLength() + incDist); - } - - Debug.Log("currentDistance: " + currentDistance + " rope.getLength(): " + rope.getLength()); - } - - public void ReelIn(float reelIn) - { - if (reelIn < 0f && rope.getLength() <= rope.segPropertiesCylinder.length) - { - reelIn = 0f; - } - - rope.rate = reelIn; - } - - public float CalculateDistance() - { - return Vector3.Distance(ropeStart.position, ropeFloat.position); - } - - public void ThrowBait() - { - Debug.Log("ThrowBait"); - incDist = incDistThrow; - ropeStart.position = throwPosition.position; - rope.regenerateRope(true); - ropeStart.GetComponent().AddForce((fishingPlayer.forward + throwDir).normalized * throwForce); - Debug.DrawLine(ropeStart.position, - ropeStart.position + (fishingPlayer.forward + throwDir).normalized * throwForce, Color.yellow, 5f); - wasThrown = true; - } - - public void ResetBait(bool quick = false) - { - if (quick) - { - ropeStart.position = startPosition.position; - rope.regenerateRope(true); - } - - hitWater = false; - wasThrown = false; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTest.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTest.cs.meta deleted file mode 100644 index 248df6579..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTest.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 8120306974a64ee3b78322d877915631 -timeCreated: 1762029973 \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTestLogic.cs b/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTestLogic.cs deleted file mode 100644 index 9daea79e0..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTestLogic.cs +++ /dev/null @@ -1,85 +0,0 @@ -// using UnityEngine; -// -// namespace PhysicsTools -// { -// public class RopeTestLogic : MonoBehaviour -// { -// public GameObject fishingRod; -// -// public GameObject bait; -// -// public GameObject baitStartPos; -// -// public GameObject rodEndPos; -// -// public UltimateRope rope; -// -// public float throwStrength = 10f; -// -// public float ropeLengthMargin = 3f; -// -// private bool isThrown; -// -// private void Start() -// { -// rope.Regenerate(); -// rope.GetComponent().UpdateNodes(rope); -// } -// -// private void Update() -// { -// if (Input.GetKeyDown(KeyCode.T)) -// { -// ThrowBait(); -// } -// -// if (Input.GetKeyDown(KeyCode.R)) -// { -// ResetBait(); -// } -// -// if (Input.GetKeyDown(KeyCode.Z)) -// { -// rope.ExtendRope(UltimateRope.ERopeExtensionMode.LinearExtensionIncrement, -0.1f); -// } -// else if (Input.GetKeyDown(KeyCode.X)) -// { -// rope.ExtendRope(UltimateRope.ERopeExtensionMode.LinearExtensionIncrement, 0.1f); -// } -// -// if (isThrown) -// { -// UpdateRope(); -// } -// } -// -// public void UpdateRope() -// { -// float num = Vector3.Distance(rodEndPos.transform.position, bait.transform.position); -// if (rope.m_fCurrentExtension < num + ropeLengthMargin - rope.RopeNodes[0].fLength) -// { -// rope.ExtendRope(UltimateRope.ERopeExtensionMode.LinearExtensionIncrement, -// num + ropeLengthMargin - rope.RopeNodes[0].fLength - rope.m_fCurrentExtension); -// } -// } -// -// public void ThrowBait() -// { -// bait.transform.localRotation = Quaternion.Euler(0f, 0f, 0f); -// Vector3 forward = base.transform.forward; -// bait.GetComponent().isKinematic = false; -// bait.GetComponent().AddForce(forward * throwStrength); -// isThrown = true; -// } -// -// public void ResetBait() -// { -// bait.transform.position = baitStartPos.transform.position; -// bait.GetComponent().isKinematic = true; -// bait.GetComponent().velocity = Vector3.zero; -// bait.GetComponent().angularVelocity = Vector3.zero; -// rope.ExtendRope(UltimateRope.ERopeExtensionMode.LinearExtensionIncrement, 0f - rope.m_fCurrentExtension); -// isThrown = false; -// } -// } -// } \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTestLogic.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTestLogic.cs.meta deleted file mode 100644 index 3c1835d22..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Test/RopeTestLogic.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 15b3231410b74742829eccac62da7670 -timeCreated: 1762030063 \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Utility.cs b/Assets/Scripts/ThirdParty/PhysicsTools/Utility.cs deleted file mode 100644 index 00558282c..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Utility.cs +++ /dev/null @@ -1,272 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using UnityEngine; - -namespace PhysicsTools -{ - public class Utility - { - public class Calc - { - private float r_length; - - private float h; - - private float d; - - public Calc(float r_, float h_, float d_) - { - r_length = r_; - h = h_; - d = d_; - } - - public float g(float s) - { - return (float)(2.0 * Math.Sinh(s * d / 2f) / (double)s - Math.Sqrt(r_length * r_length - h * h)); - } - - public float dg(float s) - { - return (float)(2.0 * Math.Cosh(s * d / 2f) * (double)d / (double)(2f * s) - 2.0 * Math.Sinh(s * d / 2f) / (double)(s * s)); - } - } - - private const float DEG_2_RAD = 0.017453277f; - - private const float RAD_2_DEG = 57.29583f; - - public static void MatrixToTRS(Matrix4x4 mat, out Vector3 pos, out Quaternion rot, out Vector3 scale) - { - pos = mat.GetColumn(3); - rot = Quaternion.LookRotation(mat.GetColumn(2), mat.GetColumn(1)); - scale = new Vector3(mat.GetColumn(0).magnitude, mat.GetColumn(1).magnitude, mat.GetColumn(2).magnitude); - } - - private static void Swap(ref T lhs, ref T rhs) - { - T val = lhs; - lhs = rhs; - rhs = val; - } - - public static List getCatenaryPts(Vector3 vStart, Vector3 vEnd, float r_length, int N) - { - bool flag = false; - int num = 100; - float num2 = 1E-10f; - float num3 = 1E-08f; - float num4 = 0.5f; - float num5 = 1E-09f; - float num6 = 0.001f; - if (vStart.y > vEnd.y) - { - Swap(ref vStart, ref vEnd); - flag = true; - } - Vector3 vector = vEnd - vStart; - float y = vector.y; - vector.y = 0f; - Vector3 vector2 = vector / (N - 1); - float magnitude = vector.magnitude; - vector.Normalize(); - float num7 = ((magnitude == 0f) ? 1f : (1f / magnitude)); - List list = new List(new Vector3[N]); - if (Math.Abs(magnitude) < num6) - { - Vector3 vector3 = new Vector3((vStart.x + vEnd.x) / 2f, 0f, (vStart.z + vEnd.z) / 2f); - if (r_length < Math.Abs(y)) - { - for (int i = 0; i < N; i++) - { - list[i] = vector3 + new Vector3(0f, vStart.y + y * ((float)i * 1f / (float)(N - 1)), 0f); - } - } - else - { - num7 = (r_length - Math.Abs(y)) / 2f; - int num8 = (int)Math.Ceiling((float)N * num7 / r_length); - float num9 = Math.Max(vStart.y, vEnd.y); - float num10 = Math.Min(vStart.y, vEnd.y); - for (int j = 0; j < N; j++) - { - if (j < N - num8) - { - float num11 = num10 - num7 - num9; - float num12 = num11 * ((float)j * 1f / ((float)(N - num8) - 1f)); - list[j] = vector3 + new Vector3(0f, num9 + num12, 0f); - } - else - { - float num13 = num7; - float num14 = num13 * ((float)j * 1f / ((float)num8 - 1f)); - vector3 = (list[j] = vector3 + new Vector3(0f, num10 - num7 + num14, 0f)); - } - } - } - } - else if ((double)r_length <= Math.Sqrt(magnitude * magnitude + y * y)) - { - for (int k = 0; k < N; k++) - { - Vector3 value = vStart + k * vector2; - float num15 = (float)k * (vEnd.y - vStart.y) / (float)(N - 1); - value.y = vStart.y + num15; - list[k] = value; - } - } - else - { - Calc calc = new Calc(r_length, y, magnitude); - for (int l = 0; l < num; l++) - { - float value2 = calc.g(num7); - float value3 = calc.dg(num7); - if (Math.Abs(value2) < num3 || Math.Abs(value3) < num2) - { - break; - } - float num16 = (0f - calc.g(num7)) / calc.dg(num7); - float num17 = 1f; - float num18 = num7 + num17 * num16; - while (num18 < 0f || Math.Abs(calc.g(num18)) > Math.Abs(value2)) - { - num17 = num4 * num17; - if (num17 < num5) - { - break; - } - num18 = num7 + num17 * num16; - } - num7 = num18; - } - float num19 = (float)(0.5 * (Math.Log((r_length + y) / (r_length - y)) / (double)num7 - (double)magnitude)); - vector.y = 0f; - vector.Normalize(); - Vector3 vector5 = vStart - num19 * vector; - vector5.y = 0f; - float num20 = (float)((double)vStart.y - Math.Cosh(num19 * num7) / (double)num7); - for (int m = 0; m < N; m++) - { - Vector3 vector6 = vStart + m * vector2; - Vector3 vector7 = vector6; - vector6.y = 0f; - vector6.y = (float)(Math.Cosh((vector6 - vector5).magnitude * num7) / (double)num7 + (double)num20); - list[m] = vector6; - } - } - if (flag) - { - list.Reverse(); - } - return list; - } - - public static Quaternion createOrientation(Vector3 v) - { - if (v.x == 0f && v.y == 0f && v.z == 0f) - { - return Quaternion.identity; - } - Vector3 vector = new Vector3(0f, 1f, 0f); - Vector3 vector2 = Vector3.Cross(v, vector); - vector2.Normalize(); - float num = Vector3.Dot(vector, v); - if (num > 1f) - { - num = 1f; - } - else if (num < -1f) - { - num = -1f; - } - float num2 = (float)Math.Acos(num); - return Quaternion.AngleAxis(num2 * 180f / 3.14159f, -vector2); - } - - public static T DeepClone(T a) - { - using (MemoryStream memoryStream = new MemoryStream()) - { - BinaryFormatter binaryFormatter = new BinaryFormatter(); - binaryFormatter.Serialize(memoryStream, a); - memoryStream.Position = 0L; - return (T)binaryFormatter.Deserialize(memoryStream); - } - } - - private static Dictionary> buildMapOfJoints() - { - Dictionary> dictionary = new Dictionary>(); - UnityEngine.Joint[] array = UnityEngine.Object.FindObjectsOfType(); - UnityEngine.Joint[] array2 = array; - foreach (UnityEngine.Joint joint in array2) - { - Rigidbody component = joint.gameObject.GetComponent(); - if (component != null) - { - if (!dictionary.ContainsKey(component)) - { - dictionary.Add(component, new List()); - } - dictionary[component].Add(joint); - } - Rigidbody connectedBody = joint.connectedBody; - if (connectedBody != null) - { - if (!dictionary.ContainsKey(connectedBody)) - { - dictionary.Add(connectedBody, new List()); - } - dictionary[connectedBody].Add(joint); - } - } - return dictionary; - } - - private static void getConnectedBodies(ref Dictionary> dic, Rigidbody body, ref HashSet bodies) - { - bodies.Add(body); - if (!dic.ContainsKey(body)) - { - return; - } - List list = dic[body]; - foreach (UnityEngine.Joint item in list) - { - if (item.connectedBody != null && !bodies.Contains(item.connectedBody)) - { - getConnectedBodies(ref dic, item.connectedBody, ref bodies); - } - Rigidbody component = item.gameObject.GetComponent(); - if (component != null && !bodies.Contains(component)) - { - getConnectedBodies(ref dic, component, ref bodies); - } - } - } - - public static void moveConnectedBodies(Rigidbody start, Matrix4x4 newPose) - { - Dictionary> dic = buildMapOfJoints(); - HashSet bodies = new HashSet(); - getConnectedBodies(ref dic, start, ref bodies); - Matrix4x4 matrix4x = Matrix4x4.TRS(start.transform.position, start.transform.rotation, new Vector3(1f, 1f, 1f)); - foreach (Rigidbody item in bodies) - { - Matrix4x4 matrix4x2 = Matrix4x4.TRS(item.transform.position, item.transform.rotation, new Vector3(1f, 1f, 1f)); - Matrix4x4 inverse = matrix4x.inverse; - matrix4x2 = inverse * matrix4x2; - matrix4x2 = newPose * matrix4x2; - Vector3 pos; - Quaternion rot; - Vector3 scale; - MatrixToTRS(matrix4x2, out pos, out rot, out scale); - item.transform.position = pos; - item.transform.rotation = rot; - } - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Utility.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/Utility.cs.meta deleted file mode 100644 index 17119b852..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Utility.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 93c19397aa18981aebed2e7aba8ca270 -timeCreated: 1747788122 -licenseType: Free -MonoImporter: - serializedVersion: 2 - name: - externalObjects: {} - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Winch.cs b/Assets/Scripts/ThirdParty/PhysicsTools/Winch.cs deleted file mode 100644 index 52fb4201c..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Winch.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using UnityEngine; - -namespace PhysicsTools -{ - public class Winch : MonoBehaviour - { - public float brakeForce; - - public float heaveTorque; - - public float tensionTorque; - - public float radius; - - public float length; - - public float inertia; - - public float maxRopeLength; - - public float minRopeLength; - - public float rpm; - - public float maxRPM; - - private float omega; - - public Rope rope; - - public Winch() - { - radius = 1f; - length = 1f; - maxRPM = 1f; - omega = 0f; - } - - private void FixedUpdate() - { - float fixedDeltaTime = Time.fixedDeltaTime; - float num = tensionTorqueValue() - heaveTorque; - float num2 = num / inertia; - float num3 = brakeForce * radius / inertia; - float num4 = omega + num2 * fixedDeltaTime; - if ((num2 < 0f && rope.getLength() > minRopeLength) || (num2 > 0f && num2 > num3 && rope.getLength() < maxRopeLength)) - { - if (num4 > 0f && num4 - num3 * fixedDeltaTime < 0f) - { - num4 = 0f; - } - else if (num4 < 0f && num4 + num3 * fixedDeltaTime > 0f) - { - num4 = 0f; - } - else if (num4 > 0f) - { - num4 -= num3 * fixedDeltaTime; - } - else if (num4 < 0f) - { - num4 += num3 * fixedDeltaTime; - } - omega = num4; - rope.changeLength(getLinearSpeed() * fixedDeltaTime); - } - else - { - omega = 0f; - } - rpm = omega / 6.28318f * 60f; - if (Math.Abs(rpm) > maxRPM) - { - if (rpm < 0f) - { - rpm = 0f - maxRPM; - } - else - { - rpm = maxRPM; - } - } - omega = rpm / 60f * 6.28318f; - } - - private float tensionTorqueValue() - { - tensionTorque = radius * getTension(); - return tensionTorque; - } - - private float getLinearSpeed() - { - return omega * radius; - } - - private float getTension() - { - return rope.getTension(); - } - } -} diff --git a/Assets/Scripts/ThirdParty/PhysicsTools/Winch.cs.meta b/Assets/Scripts/ThirdParty/PhysicsTools/Winch.cs.meta deleted file mode 100644 index 7e30353ba..000000000 --- a/Assets/Scripts/ThirdParty/PhysicsTools/Winch.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: fac89f9401be21c56be128e602bbd1cd -timeCreated: 1747788127 -licenseType: Free -MonoImporter: - serializedVersion: 2 - name: - externalObjects: {} - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Core/DisableInPlayModeAttribute.cs b/Assets/Scripts/ThirdParty/Rope/Core/DisableInPlayModeAttribute.cs deleted file mode 100644 index e55ebdc68..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/DisableInPlayModeAttribute.cs +++ /dev/null @@ -1,10 +0,0 @@ -using UnityEngine; - -namespace NBF -{ - public class DisableInPlayModeAttribute : PropertyAttribute - { - public DisableInPlayModeAttribute() - { } - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Core/DisableInPlayModeAttribute.cs.meta b/Assets/Scripts/ThirdParty/Rope/Core/DisableInPlayModeAttribute.cs.meta deleted file mode 100644 index 0e3be7134..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/DisableInPlayModeAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 41aa8ad4cfb989c4bba7e1e5615356cd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Core/Editor.meta b/Assets/Scripts/ThirdParty/Rope/Core/Editor.meta deleted file mode 100644 index fa2e83182..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2f8ad20496e568346942cb85d75a2bde -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Core/Editor/DisableInPlayModePropertyDrawer.cs b/Assets/Scripts/ThirdParty/Rope/Core/Editor/DisableInPlayModePropertyDrawer.cs deleted file mode 100644 index 51063ebf7..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/Editor/DisableInPlayModePropertyDrawer.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine; -using UnityEditor; -using UnityEngine.UIElements; - -namespace NBF -{ - [CustomPropertyDrawer(typeof(DisableInPlayModeAttribute))] - public class BeginLockInPlayModeDecoratorDrawer : PropertyDrawer - { - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return EditorGUI.GetPropertyHeight(property, label, true); - } - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - var playing = Application.isPlaying; - if (playing) - { - GUI.enabled = false; - } - - var ranges = fieldInfo.GetCustomAttributes(typeof(RangeAttribute), true); - var range = ranges != null && ranges.Length > 0 ? ranges[0] as RangeAttribute : null; - if (range != null && property.propertyType == SerializedPropertyType.Float) - { - EditorGUI.Slider(position, property, range.min, range.max); - } - else if (range != null && property.propertyType == SerializedPropertyType.Integer) - { - EditorGUI.IntSlider(position, property, (int)range.min, (int)range.max); - } - else - { - EditorGUI.PropertyField(position, property, label, true); - } - - if (playing) - { - GUI.enabled = true; - } - } - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Core/Editor/DisableInPlayModePropertyDrawer.cs.meta b/Assets/Scripts/ThirdParty/Rope/Core/Editor/DisableInPlayModePropertyDrawer.cs.meta deleted file mode 100644 index c105d34c2..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/Editor/DisableInPlayModePropertyDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f096bd19e16171c4bad990519eddc8b7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Core/Editor/RopeEditor.cs b/Assets/Scripts/ThirdParty/Rope/Core/Editor/RopeEditor.cs deleted file mode 100644 index f3d56dc09..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/Editor/RopeEditor.cs +++ /dev/null @@ -1,80 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Collections.Generic; -using Unity.Collections; -using Unity.Mathematics; - -namespace NBF -{ - [CustomEditor(typeof(Rope)), CanEditMultipleObjects] - public class RopeEditor : Editor - { - public override void OnInspectorGUI() - { - base.OnInspectorGUI(); - } - - public void OnSceneGUI() - { - if (Application.isPlaying) - { - return; - } - - var rope = target as Rope; - if (rope == null) - { - return; - } - - // Draw floating window with buttons - if (Selection.objects.Length == 1) - { - Handles.BeginGUI(); - GUI.skin = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Scene); - - var lastSpawn = rope.spawnPoints.Count > 0 ? rope.spawnPoints[rope.spawnPoints.Count - 1] : float3.zero; - var location = HandleUtility.WorldToGUIPoint(rope.transform.TransformPoint(lastSpawn)) + Vector2.right * 64.0f; - GUILayout.Window(0, new Rect(location, Vector2.one), (id) => - { - if (GUILayout.Button("Push spawn point")) - { - Undo.RecordObject(rope, "Push Rope Spawn Point"); - rope.PushSpawnPoint(); - } - if (rope.spawnPoints.Count > 2 && GUILayout.Button("Pop spawn point")) - { - Undo.RecordObject(rope, "Pop Rope Spawn Point"); - rope.PopSpawnPoint(); - } - }, rope.gameObject.name); - - Handles.EndGUI(); - } - - // Draw position handles - Handles.color = Rope.Colors.spawnPointHandle; - for (int i = 0; i < rope.spawnPoints.Count; i++) - { - var spawnPoint = rope.spawnPoints[i]; - var position = rope.transform.TransformPoint(spawnPoint); - - EditorGUI.BeginChangeCheck(); - if (Event.current.modifiers.HasFlag(EventModifiers.Shift)) - { - position = Handles.PositionHandle(position, Quaternion.identity); - } - else - { - var fmh_69_65_638978072337815361 = Quaternion.identity; position = Handles.FreeMoveHandle(position, rope.radius * 4.0f, Vector3.one * 0.5f, Handles.SphereHandleCap); - } - if (EditorGUI.EndChangeCheck()) - { - Undo.RecordObject(rope, "Move Rope Spawn Point"); - spawnPoint = rope.transform.InverseTransformPoint(position); - rope.spawnPoints[i] = spawnPoint; - } - } - } - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Core/Editor/RopeEditor.cs.meta b/Assets/Scripts/ThirdParty/Rope/Core/Editor/RopeEditor.cs.meta deleted file mode 100644 index f164085f2..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/Editor/RopeEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cb712eea104baa44597cd77e9a7f2cb1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Core/PointsExtensions.cs b/Assets/Scripts/ThirdParty/Rope/Core/PointsExtensions.cs deleted file mode 100644 index 8ff3897de..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/PointsExtensions.cs +++ /dev/null @@ -1,203 +0,0 @@ -using UnityEngine; -using Unity.Mathematics; -using Unity.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace NBF -{ - public static class PointsExtensions - { - // Curve length - public static float GetLengthOfCurve(this NativeArray curve, ref float4x4 transform) - { - if (curve == null || curve.Length == 0) - { - return 0.0f; - } - var sum = 0.0f; - var firstPoint = math.mul(transform, new float4(curve[0], 1.0f)).xyz; - var lastPoint = firstPoint; - for (int i = 1; i < curve.Length; i++) - { - var point = math.mul(transform, new float4(curve[i], 1.0f)).xyz; - sum += math.distance(lastPoint, point); - lastPoint = point; - } - - return sum; - } - - public static float GetLengthOfCurve(this NativeArray curve) - { - var transform = float4x4.identity; - return curve.GetLengthOfCurve(ref transform); - } - - public static float GetLengthOfCurve(this IEnumerable curve, ref float4x4 transform) - { - var array = new NativeArray(curve.ToArray(), Allocator.Temp); - var sum = array.GetLengthOfCurve(ref transform); - array.Dispose(); - return sum; - } - - public static float GetLengthOfCurve(this IEnumerable curve) - { - var transform = float4x4.identity; - return curve.GetLengthOfCurve(ref transform); - } - - // Curve points - private static void GetPointAlongCurve(this NativeArray curve, ref float4x4 transform, float distance, out float3 point, ref int currentTargetIndex, ref float accumulatedLength) - { - if (curve.Length < 2) - { - throw new System.ArgumentException(nameof(curve)); - } - if (currentTargetIndex < 1 || currentTargetIndex >= curve.Length) - { - throw new System.ArgumentOutOfRangeException(nameof(currentTargetIndex)); - } - - var previousTarget = curve[currentTargetIndex - 1]; - while (currentTargetIndex < curve.Length) - { - var target = curve[currentTargetIndex]; - var segmentLength = math.distance(previousTarget, target); - - if (distance <= accumulatedLength + segmentLength) - { - var interpolated = math.lerp(previousTarget, target, (distance - accumulatedLength) / segmentLength); - point = math.mul(transform, new float4(interpolated, 1.0f)).xyz; - return; - } - - currentTargetIndex++; - accumulatedLength += segmentLength; - previousTarget = target; - } - - // numerical precision made this happen, just return last point - currentTargetIndex = curve.Length - 1; - point = math.mul(transform, new float4(previousTarget, 1.0f)).xyz; - } - - public static void GetPointAlongCurve(this NativeArray curve, ref float4x4 transform, float distance, out float3 point) - { - var currentTargetIndex = 1; - var accumulatedLength = 0.0f; - curve.GetPointAlongCurve(ref transform, distance, out point, ref currentTargetIndex, ref accumulatedLength); - } - - public static void GetPointAlongCurve(this NativeArray curve, float distance, out float3 point) - { - var transform = float4x4.identity; - curve.GetPointAlongCurve(ref transform, distance, out point); - } - - public static void GetPointAlongCurve(this IEnumerable curve, ref float4x4 transform, float distance, out float3 point) - { - var array = new NativeArray(curve.ToArray(), Allocator.Temp); - array.GetPointAlongCurve(ref transform, distance, out point); - array.Dispose(); - } - - public static void GetPointAlongCurve(this IEnumerable curve, float distance, out float3 point) - { - var transform = float4x4.identity; - curve.GetPointAlongCurve(ref transform, distance, out point); - } - - public static void GetPointsAlongCurve(this NativeArray curve, ref float4x4 transform, float desiredPointDistance, NativeArray result) - { - var currentTargetIndex = 1; - var accumulatedLength = 0.0f; - for (int i = 0; i < result.Length; i++) - { - curve.GetPointAlongCurve(ref transform, desiredPointDistance * i, out float3 point, ref currentTargetIndex, ref accumulatedLength); - - result[i] = point; - } - } - - public static void GetPointsAlongCurve(this NativeArray curve, float desiredPointDistance, NativeArray result) - { - var transform = float4x4.identity; - curve.GetPointsAlongCurve(ref transform, desiredPointDistance, result); - } - - public static void GetPointsAlongCurve(this IEnumerable curve, ref float4x4 transform, float desiredPointDistance, NativeArray result) - { - var array = new NativeArray(curve.ToArray(), Allocator.Temp); - array.GetPointsAlongCurve(ref transform, desiredPointDistance, result); - array.Dispose(); - } - - public static void GetPointsAlongCurve(this IEnumerable curve, float desiredPointDistance, NativeArray result) - { - var transform = float4x4.identity; - curve.GetPointsAlongCurve(ref transform, desiredPointDistance, result); - } - - // Closest point - public static void GetClosestPoint(this NativeArray curve, float3 point, out int index, out float distance) - { - index = 0; - var closestDistanceSq = math.distancesq(curve[0], point); - for (int i = 1; i < curve.Length; i++) - { - var distSq = math.distancesq(curve[i], point); - if (distSq < closestDistanceSq) - { - index = i; - closestDistanceSq = distSq; - } - } - distance = math.sqrt(closestDistanceSq); - } - - public static void GetClosestPoint(this NativeArray curve, Ray ray, out int index, out float distance, out float distanceAlongRay) - { - index = 0; - var origin = (float3)ray.origin; - var dir = math.normalizesafe(ray.direction); - var closestDistanceAlongRay = math.dot(curve[0] - origin, dir); - var closestDistanceSq = math.distancesq(origin + closestDistanceAlongRay * dir, curve[0]); - for (int i = 1; i < curve.Length; i++) - { - var position = curve[i]; - var rayDist = math.dot(position - origin, dir); - var distSq = math.distancesq(origin + rayDist * dir, position); - if (distSq < closestDistanceSq) - { - index = i; - closestDistanceAlongRay = rayDist; - closestDistanceSq = distSq; - } - } - distance = math.sqrt(closestDistanceSq); - distanceAlongRay = closestDistanceAlongRay; - } - - // Distance - public static void KeepAtDistance(this ref float3 point, ref float3 otherPoint, float distance, float stiffness = 1.0f) - { - var delta = otherPoint - point; - - var currentDistance = math.length(delta); - if (currentDistance > 0.0f) - { - delta /= currentDistance; - } - else - { - delta = float3.zero; - } - delta *= (currentDistance - distance) * stiffness; - - point += delta; - otherPoint -= delta; - } - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Core/PointsExtensions.cs.meta b/Assets/Scripts/ThirdParty/Rope/Core/PointsExtensions.cs.meta deleted file mode 100644 index 46e5701da..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/PointsExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 460fdf7888d541b48bd9e15bfcb51528 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Core/RigidbodyExtensions.cs b/Assets/Scripts/ThirdParty/Rope/Core/RigidbodyExtensions.cs deleted file mode 100644 index 85e5d7336..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/RigidbodyExtensions.cs +++ /dev/null @@ -1,92 +0,0 @@ -using UnityEngine; -using Unity.Mathematics; -using Unity.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace NBF -{ - public static class RigidbodyExtensions - { - public static void GetLocalInertiaTensor(this Rigidbody rb, out float3x3 localInertiaTensor) - { - var rot = new float3x3(rb.inertiaTensorRotation); - var invRot = math.transpose(rot); - - localInertiaTensor = math.mul(math.mul(rot, float3x3.Scale(rb.inertiaTensor)), invRot); - } - - public static void GetInertiaTensor(this Rigidbody rb, out float3x3 inertiaTensor) - { - rb.GetLocalInertiaTensor(out float3x3 localInertiaTensor); - - var rot = new float3x3(rb.rotation); - var invRot = math.transpose(rot); - - inertiaTensor = math.mul(math.mul(rot, localInertiaTensor), invRot); - } - - public static void GetInvInertiaTensor(this Rigidbody rb, out float3x3 invInertiaTensor) - { - rb.GetLocalInertiaTensor(out float3x3 localTensor); - - float3x3 invLocalTensor = float3x3.zero; - if (math.determinant(localTensor) != 0.0f) - { - invLocalTensor = math.inverse(localTensor); - } - - var rot = new float3x3(rb.rotation); - var invRot = math.transpose(rot); - - invInertiaTensor = math.mul(math.mul(rot, invLocalTensor), invRot); - } - - public static void ApplyImpulseNow(this Rigidbody rb, ref float3x3 invInertiaTensor, float3 point, float3 impulse) - { - if (rb.mass == 0.0f) - { - return; - } - - var relativePoint = point - (float3)rb.worldCenterOfMass; - var angularMomentumChange = math.cross(relativePoint, impulse); - var angularVelocityChange = math.mul(invInertiaTensor, angularMomentumChange); - - rb.linearVelocity += (Vector3)impulse / rb.mass; - rb.angularVelocity += (Vector3)angularVelocityChange; - } - - public static void ApplyImpulseNow(this Rigidbody rb, float3 point, float3 impulse) - { - rb.GetInvInertiaTensor(out float3x3 invInertiaTensor); - rb.ApplyImpulseNow(ref invInertiaTensor, point, impulse); - } - - public static void SetPointVelocityNow(this Rigidbody rb, ref float3x3 invInertiaTensor, float3 point, float3 normal, float desiredSpeed, float damping = 1.0f) - { - if (rb.mass == 0.0f) - { - return; - } - - var velocityChange = desiredSpeed - math.dot(rb.GetPointVelocity(point), normal) * damping; - var relativePoint = point - (float3)rb.worldCenterOfMass; - - var denominator = (1.0f / rb.mass) + math.dot(math.cross(math.mul(invInertiaTensor, math.cross(relativePoint, normal)), relativePoint), normal); - if (denominator == 0.0f) - { - return; - } - - var j = velocityChange / denominator; - rb.ApplyImpulseNow(ref invInertiaTensor, point, j * normal); - } - - public static void SetPointVelocityNow(this Rigidbody rb, float3 point, float3 normal, float desiredSpeed, float damping = 1.0f) - { - rb.GetInvInertiaTensor(out float3x3 invInertiaTensor); - rb.SetPointVelocityNow(ref invInertiaTensor, point, normal, desiredSpeed, damping); - } - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Core/RigidbodyExtensions.cs.meta b/Assets/Scripts/ThirdParty/Rope/Core/RigidbodyExtensions.cs.meta deleted file mode 100644 index 7e27f083d..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Core/RigidbodyExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 40ab74e53dce5804b8debdf053bccfae -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/ApplyTorqueOnKey.cs b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/ApplyTorqueOnKey.cs deleted file mode 100644 index f71165c93..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/ApplyTorqueOnKey.cs +++ /dev/null @@ -1,34 +0,0 @@ -using UnityEngine; - -namespace NBF.Example -{ - public class ApplyTorqueOnKey : MonoBehaviour - { - public Vector3 relativeTorque; - public float maxAngularSpeed; - - public KeyCode key; - - protected Rigidbody rb; - - public void Start() - { - rb = GetComponent(); - } - - public void FixedUpdate() - { - if (rb == null) - { - return; - } - - if (Input.GetKey(key)) - { - var torqueAxis = relativeTorque.normalized; - var strength = Mathf.SmoothStep(relativeTorque.magnitude, 0.0f, Vector3.Dot(torqueAxis, rb.angularVelocity) / maxAngularSpeed); - rb.AddRelativeTorque(torqueAxis * strength, ForceMode.Force); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/ApplyTorqueOnKey.cs.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/ApplyTorqueOnKey.cs.meta deleted file mode 100644 index c4f51ea2b..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/ApplyTorqueOnKey.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c1451225f8bdb1545ae082cfd03cddfd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment.meta deleted file mode 100644 index bb5603a95..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: cbda5c1a7c14e1841af127f4317557d0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.asset b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.asset deleted file mode 100644 index af63e6b6a..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.asset +++ /dev/null @@ -1,165 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!43 &4300000 -Mesh: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Environment - serializedVersion: 10 - m_SubMeshes: - - serializedVersion: 2 - firstByte: 0 - indexCount: 240 - topology: 0 - baseVertex: 0 - firstVertex: 0 - vertexCount: 160 - localAABB: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 10, y: 3, z: 10} - 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: 000001000200010003000200040005000600050007000600080009000a0009000b000a000c000d000e000d000f000e00100011001200110013001200140015001600150017001600180019001a0019001b001a001c001d001e001d001f001e00200021002200210023002200240025002600250027002600280029002a0029002b002a002c002d002e002d002f002e00300031003200310033003200340035003600350037003600380039003a0039003b003a003c003d003e003d003f003e00400041004200410043004200440045004600450047004600480049004a0049004b004a004c004d004e004d004f004e00500051005200510053005200540055005600550057005600580059005a0059005b005a005c005d005e005d005f005e00600061006200610063006200640065006600650067006600680069006a0069006b006a006c006d006e006d006f006e00700071007200710073007200740075007600750077007600780079007a0079007b007a007c007d007e007d007f007e00800081008200810083008200840085008600850087008600880089008a0089008b008a008c008d008e008d008f008e00900091009200910093009200940095009600950097009600980099009a0099009b009a009c009d009e009d009f009e00 - m_VertexData: - serializedVersion: 3 - m_VertexCount: 160 - 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: 48 - format: 0 - dimension: 2 - - 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 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - m_DataSize: 8960 - _typelessdata: 0000e040000000c00500e0c0abaaaab5e4388e34000080bf0000803f00000000abaaaab5000080bfeaff3fc0050000c018a8433e033b763f00008040000000c0fdffdfc05655b5b5c8719c34000080bf0000803f000000005655b5b5000080bff5ffbfc0050000c019a8433e8361643f0000a0400000803ffeffdfc05655b5b5c8719c34000080bf0000803f000000005655b5b5000080bff5ff9fc0edff7f3f0c87853ead546a3f000080400000803ffbffdfc00000c0b5abaaaa34000080bf0000803f000000000000c0b5000080bff5ffbfc0edff7f3f0c87853e8361643f00008040000000c0fdffdfc0000080bf3a8ee3aaacaaaa35acaaaab52ab41795000080bf000080bf0e008040000000c0efb4bd3e49694d3f08008040000000c0fbff7fc0000080bf3a8ee3aaacaaaa35acaaaab500000000000080bf000080bf1b004040000000c0ed67e13e48694d3f000080400000803ffbffdfc0000080bf3a8ee3aaacaaaa35acaaaab500000000000080bf000080bf0c0080400000803ff0b4bd3eca425f3f080080400000803ff7ff7fc0000080bf3a8ee3aaacaaaa35acaaaab500000000000080bf000080bf1b0040400000803fee67e13ec9425f3f08008040000000c0fbff7fc05555b535abaaaab40000803f000080bf000000005555b535000080bff5ffbf40040000c07e77b33e48694d3f0800e040000000c0060080c0aaaaaa355655d5b40000803f000080bf00000000aaaaaa35000080bfeaff3f40040000c07e77b33ec8425f3f080080400000803ff7ff7fc0aaaaaa355655d5b40000803f000080bf00000000aaaaaa35000080bff5ffbf40efff7f3f7fc48f3e48694d3f0800a0400000803ffcff7fc00000a035000000b50000803f000080bf000000000000a035000080bff5ff9f40efff7f3f80c48f3e735c533f0800e040000000c0060080c04001553fd6000e3fd7008eb5acaaaa35000000000000803f000080bf1b0040c0000060b617a2983e8a60173f0000e040000000c00500e0c04001553fd6000e3fd6008eb5acaaaa35000000000000803f000080bf0e0080c0000060b616a2983e0a3a293f0800a0400000803ffcff7fc04001553fd6000e3fd6008eb5acaaaa35000000000000803f000080bf190040c04cc16640c4745b3e8960173f0000a0400000803ffeffdfc03f01553fd5000e3fd5008eb5abaaaa356e563d290000803f000080bf0c0080c04cc16640c2745b3e093a293f0000a0400000803ffeffdfc0000000000000803f00000000000080bf00000000060040ab000080bff8ff9fc0010080c0c2745b3e093a293f000080400000803ffbffdfc0000000000000803f00000000000080bf000000002c0000b4000080bf000080c0020080c018a8433e093a293f0800a0400000803ffcff7fc0000000000000803f00000000000080bf000000002c0000b4000080bf0000a0c00000a0c0c4745b3e8960173f080080400000803ff7ff7fc0000000000000803f00000000000080bf00000000140080b4000080bf080080c00100a0c019a8433e8960173f0800e040000000c0060080c000000000000080bf000000000000803f00000000aaabaa33000080bf0000e040fdff9fc022a8433e934a483f08008040000000c0fbff7fc000000000000080bf000000000000803f0000000046ffffb3000080bf080080400000a0c018a8433e1271363f0000e040000000c00500e0c000000000000080bf000000000000803f0000000046ffffb3000080bff8ffdf40000080c00e87853e914a483f00008040000000c0fdffdfc000000000000080bf000000000000803f000000008daaaab4000080bf00008040020080c00987853e1071363f0000a0c0000000c00000004000000000000000000000803f000080bf0000000000000000000080bf0000a040000080c07d2ad73ec3582e3f000090c0000000c00000004000000000000000000000803f000080bf0000000000000000000080bf00008040000080c07d2ad73e5852313f0000a0c0000020400000004000000000000000000000803f000080bf0000000000000000000080bf0000a0400000a040fd9da13ec3582e3f000090c0000020400000004000000000000000000000803f000080bf0000000000000000000080bf000080400000a040fd9da13e5852313f000090c0000000c0000000400000803f000000000000000000000000000000000000803f000080bf0000c0c0000080c0e146233e8960173f000090c0000000c00000c03f0000803f000000000000000000000000000000000000803f000080bf0000e0c0000080c0362d2f3e8960173f000090c000002040000000400000803f000000000000000000000000000000000000803f000080bf0000c0c00000a040e146233ec926323f000090c0000020400000c03f0000803f000000000000000000000000000000000000803f000080bf0000e0c00000a040362d2f3ec926323f000090c0000000c00000c03f0000000000000000000080bf0000803f0000000000000000000080bf000080c0000080c00cd7a33cd547703f0000a0c0000000c00000c03f0000000000000000000080bf0000803f0000000000000000000080bf0000a0c0000080c00bd7a33c404e6d3f000090c0000020400000c03f0000000000000000000080bf0000803f0000000000000000000080bf000080c00000a040c527ff3dd547703f0000a0c0000020400000c03f0000000000000000000080bf0000803f0000000000000000000080bf0000a0c00000a040c527ff3d404e6d3f0000a0c0000000c00000c03f000080bf00000000000000000000000000000000000080bf000080bf0000e040000080c00dd7a33c173f3a3f0000a0c0000000c000000040000080bf00000000000000000000000000000000000080bf000080bf0000c040000080c0da84013d173f3a3f0000a0c0000020400000c03f000080bf00000000000000000000000000000000000080bf000080bf0000e0400000a0400fd7a33c5705553f0000a0c00000204000000040000080bf00000000000000000000000000000000000080bf000080bf0000c0400000a040db84013d5705553f0000a0c00000404000000040000000000000803f000000000000803f0000000000000000000080bf0000a0c00000c0c0d484013da41d5d3f000090c00000404000000040000000000000803f000000000000803f0000000000000000000080bf000080c00000c0c0d584013d3a17603f0000a0c0000040400000c03f000000000000803f000000000000803f0000000000000000000080bf0000a0c00000e0c00bd7a33ca41d5d3f000090c0000040400000c03f000000000000803f000000000000803f0000000000000000000080bf000080c00000e0c00cd7a33c3a17603f0000a0c0000000c00000c03f00000000000080bf00000000000080bf0000000000000000000080bf0000a0400000e0c06cdb2b3e8d66753f000090c0000000c00000c03f00000000000080bf00000000000080bf0000000000000000000080bf000080400000e0c06ddb2b3e2360783f0000a0c0000000c00000004000000000000080bf00000000000080bf0000000000000000000080bf0000a0400000c0c017f51f3e8e66753f000090c0000000c00000004000000000000080bf00000000000080bf0000000000000000000080bf000080400000c0c018f51f3e2360783f000020c1000040c00000204100000000000000000000803f000080bf0000000000000000000080bf0000a040000000c00bd7a33c0bd7a33c00002041000040c00000204100000000000000000000803f000080bf0000000000000000000080bf00008040000000c0193cf83e0bd7a33c000020c1000000c00000204100000000000000000000803f000080bf0000000000000000000080bf0000a040000080bf67d7a33c2d1e313d00002041000000c00000204100000000000000000000803f000080bf0000000000000000000080bf00008040000080bf1f3cf83e2d1e313d00002041000040c0000020410000803f000000000000000000000000000000000000803f000080bf000080c0000000c0c93c013fd984813d00002041000040c0000020c10000803f000000000000000000000000000000000000803f000080bf0000a0c0000000c01b3c783fd984813d00002041000000c0000020410000803f000000000000000000000000000000000000803f000080bf000080c0000080bfc53c013f2e1eb13d00002041000000c0000020c10000803f000000000000000000000000000000000000803f000080bf0000a0c0000080bf173c783f2e1eb13d00002041000040c0000020c10000000000000000000080bf0000803f0000000000000000000080bf000080c0000000c0c83c013f0bd7a33c000020c1000040c0000020c10000000000000000000080bf0000803f0000000000000000000080bf0000a0c0000000c01c3c783f0bd7a33c00002041000000c0000020c10000000000000000000080bf0000803f0000000000000000000080bf000080c0000080bfcb3c013f2d1e313d000020c1000000c0000020c10000000000000000000080bf0000803f0000000000000000000080bf0000a0c0000080bf1f3c783f2d1e313d000020c1000040c0000020c1000080bf00000000000000000000000000000000000080bf000080bf0000a040000000c079d7a33cd984813d000020c1000040c000002041000080bf00000000000000000000000000000000000080bf000080bf00008040000000c01b3cf83ed984813d000020c1000000c0000020c1000080bf00000000000000000000000000000000000080bf000080bf0000a040000080bf0bd7a33c2e1eb13d000020c1000000c000002041000080bf00000000000000000000000000000000000080bf000080bf00008040000080bf143cf83e2e1eb13d000020c1000000c000002041000000000000803f000000000000803f0000000000000000000080bf0000a0c0000080c0173c783ff113da3d00002041000000c000002041000000000000803f000000000000803f0000000000000000000080bf000080c0000080c0173c783fd141123f000020c1000000c0000020c1000000000000803f000000000000803f0000000000000000000080bf0000a0c00000a0c0c43c013ff113da3d00002041000000c0000020c1000000000000803f000000000000803f0000000000000000000080bf000080c00000a0c0c43c013fd141123f000020c1000040c0000020c100000000000080bf00000000000080bf0000000000000000000080bf0000a0400000a0c0173cf83ef113da3d00002041000040c0000020c100000000000080bf00000000000080bf0000000000000000000080bf000080400000a0c0173cf83ed141123f000020c1000040c00000204100000000000080bf00000000000080bf0000000000000000000080bf0000a040000080c00bd7a33cf113da3d00002041000040c00000204100000000000080bf00000000000080bf0000000000000000000080bf00008040000080c00dd7a33cd141123f0000a0c0000000c00000004100000000000000000000803f000080bf0000000000000000000080bf0000a040000080c0367a0b3e8d66753f000090c0000000c00000004100000000000000000000803f000080bf0000000000000000000080bf00008040000080c0367a0b3e2360783f0000a0c0000020400000004100000000000000000000803f000080bf0000000000000000000080bf0000a0400000a040d484013d8d66753f000090c0000020400000004100000000000000000000803f000080bf0000000000000000000080bf000080400000a040d584013d2360783f000090c0000000c0000000410000803f000000000000000000000000000000000000803f000080bf000080c0000080c00ed7a33c8960173f000090c0000000c00000f0400000803f000000000000000000000000000000000000803f000080bf0000a0c0000080c0de84013d8960173f000090c000002040000000410000803f000000000000000000000000000000000000803f000080bf000080c00000a0400dd7a33cc926323f000090c0000020400000f0400000803f000000000000000000000000000000000000803f000080bf0000a0c00000a040dd84013dc926323f000090c0000000c00000f0400000000000000000000080bf0000803f0000000000000000000080bf000080c0000080c018a8433e5852313f0000a0c0000000c00000f0400000000000000000000080bf0000803f0000000000000000000080bf0000a0c0000080c018a8433ec3582e3f000090c0000020400000f0400000000000000000000080bf0000803f0000000000000000000080bf000080c00000a0408c60973e5852313f0000a0c0000020400000f0400000000000000000000080bf0000803f0000000000000000000080bf0000a0c00000a0408c60973ec3582e3f0000a0c0000000c00000f040000080bf00000000000000000000000000000000000080bf000080bf0000a040000080c0e046233e173f3a3f0000a0c0000000c000000041000080bf00000000000000000000000000000000000080bf000080bf00008040000080c0362d2f3e173f3a3f0000a0c0000020400000f040000080bf00000000000000000000000000000000000080bf000080bf0000a0400000a040e046233e5705553f0000a0c00000204000000041000080bf00000000000000000000000000000000000080bf000080bf000080400000a040362d2f3e5705553f0000a0c00000404000000041000000000000803f000000000000803f0000000000000000000080bf0000a0c0000080c0362d2f3ea41d5d3f000090c00000404000000041000000000000803f000000000000803f0000000000000000000080bf000080c0000080c0362d2f3e3a17603f0000a0c0000040400000f040000000000000803f000000000000803f0000000000000000000080bf0000a0c00000a0c0e046233ea41d5d3f000090c0000040400000f040000000000000803f000000000000803f0000000000000000000080bf000080c00000a0c0e146233e3a17603f0000a0c0000000c00000f04000000000000080bf00000000000080bf0000000000000000000080bf0000a0400000a0c06ddb2b3e404e6d3f000090c0000000c00000f04000000000000080bf00000000000080bf0000000000000000000080bf000080400000a0c06ddb2b3ed547703f0000a0c0000000c00000004100000000000080bf00000000000080bf0000000000000000000080bf0000a040000080c018f51f3e404e6d3f000090c0000000c00000004100000000000080bf00000000000080bf0000000000000000000080bf00008040000080c018f51f3ed547703f0000a0c0000020400000c03f000080bf00000000000000000000000000000000000080bf000080bf000030410000c0400fd7a33c5705553f0000a0c00000204000000040000080bf00000000000000000000000000000000000080bf000080bf000020410000c040db84013d5705553f0000a0c0000040400000c03f000080bf00000000000000000000000000000000000080bf000080bf000030410000e0400bd7a33cecfe573f0000a0c00000404000000040000080bf00000000000000000000000000000000000080bf000080bf000020410000e040dc84013decfe573f000090c000002040000000400000803f000000000000000000000000000000000000803f000080bf000018c10000c040e146233ec926323f000090c0000020400000c03f0000803f000000000000000000000000000000000000803f000080bf000028c10000c040362d2f3ec926323f000090c000004040000000400000803f000000000000000000000000000000000000803f000080bf000018c10000e040e146233e5e20353f000090c0000040400000c03f0000803f000000000000000000000000000000000000803f000080bf000028c10000e040372d2f3e5e20353f000090c0000020400000c03f0000000000000000000080bf0000803f0000000000000000000080bf000080c00000c040c527ff3dd547703f0000a0c0000020400000c03f0000000000000000000080bf0000803f0000000000000000000080bf0000a0c00000c040c527ff3d404e6d3f000090c0000040400000c03f0000000000000000000080bf0000803f0000000000000000000080bf000080c00000e040367a0b3ed547703f0000a0c0000040400000c03f0000000000000000000080bf0000803f0000000000000000000080bf0000a0c00000e040367a0b3e404e6d3f0000a0c0000020400000004100000000000000000000803f000080bf0000000000000000000080bf0000b04000000040d484013d8d66753f000090c0000020400000004100000000000000000000803f000080bf0000000000000000000080bf0000904000000040d584013d2360783f0000a0c0000040400000004100000000000000000000803f000080bf0000000000000000000080bf0000b040000040400bd7a33c8d66753f000090c0000040400000004100000000000000000000803f000080bf0000000000000000000080bf00009040000040400cd7a33c2360783f0000a0c0000020400000f040000080bf00000000000000000000000000000000000080bf000080bf0000a04000000040e046233e5705553f0000a0c00000204000000041000080bf00000000000000000000000000000000000080bf000080bf0000804000000040362d2f3e5705553f0000a0c0000040400000f040000080bf00000000000000000000000000000000000080bf000080bf0000a04000004040e046233eecfe573f0000a0c00000404000000041000080bf00000000000000000000000000000000000080bf000080bf0000804000004040372d2f3eecfe573f000090c000002040000000410000803f000000000000000000000000000000000000803f000080bf000060c0000000400dd7a33cc926323f000090c0000020400000f0400000803f000000000000000000000000000000000000803f000080bf000090c000000040dd84013dc926323f000090c000004040000000410000803f000000000000000000000000000000000000803f000080bf000060c0000040400bd7a33c5e20353f000090c0000040400000f0400000803f000000000000000000000000000000000000803f000080bf000090c000004040de84013d5e20353f0000a0c0000020400000004000000000000080bf00000000000080bf0000000000000000000080bf0000b040000010c18c60173ef235653f000090c0000020400000004000000000000080bf00000000000080bf0000000000000000000080bf00009040000010c18c60173e872f683f0000a0c0000020400000f04000000000000080bf00000000000080bf0000000000000000000080bf0000b040000000400bd7a33cf235653f000090c0000020400000f04000000000000080bf00000000000080bf0000000000000000000080bf00009040000000400cd7a33c872f683f0000a0c00000404000000040000080bf00000000000000000000000000000000000080bf000080bf000050410000e040dc84013decfe573f0000a0c00000204000000040000080bf00000000000000000000000000000000000080bf000080bf000050410000c040db84013d5705553f0000a0c0000040400000f040000080bf00000000000000000000000000000000000080bf000080bf000000400000e040e046233eecfe573f0000a0c0000020400000f040000080bf00000000000000000000000000000000000080bf000080bf000000400000c040e046233e5705553f000090c000002040000000400000803f000000000000000000000000000000000000803f000080bf000048c10000c040e146233ec926323f000090c000004040000000400000803f000000000000000000000000000000000000803f000080bf000048c10000e040e146233e5e20353f000090c0000020400000f0400000803f000000000000000000000000000000000000803f000080bf0000c0bf0000c040dd84013dc926323f000090c0000040400000f0400000803f000000000000000000000000000000000000803f000080bf0000c0bf0000e040de84013d5e20353f000090c00000404000000040000000000000803f000000000000803f0000000000000000000080bf000080c0000010c1d584013d3a17603f0000a0c00000404000000040000000000000803f000000000000803f0000000000000000000080bf0000a0c0000010c1d484013da41d5d3f000090c0000040400000f040000000000000803f000000000000803f0000000000000000000080bf000080c000000040e146233e3a17603f0000a0c0000040400000f040000000000000803f000000000000803f0000000000000000000080bf0000a0c000000040e046233ea41d5d3f0000e0c0000000c0000080c000000000000000000000803f000080bf0000000000000000000080bf0000e040000000c07f77b33e1071363f000080c0000000c0000080c000000000000000000000803f000080bf0000000000000000000080bf00008040000000c07e77b33e904a483f0000a0c00000803f000080c000000000000000000000803f000080bf0000000000000000000080bf0000a0400000803f7fc48f3e6557423f000080c00000803f000080c000000000000000000000803f000080bf0000000000000000000080bf000080400000803f7fc48f3e904a483f000080c0000000c0000080c00000803f000000000000000000000000000000000000803f000080bf000080c0000000c018a8433e4b694d3f000080c0000000c00000e0c00000803f000000000000000000000000000000000000803f000080bf0000a0c0000000c00d87853e4b694d3f000080c00000803f000080c00000803f000000000000000000000000000000000000803f000080bf000080c00000803f18a8433eca425f3f000080c00000803f0000e0c00000803f000000000000000000000000000000000000803f000080bf0000a0c00000803f0d87853eca425f3f000080c0000000c00000e0c00000000000000000000080bf0000803f0000000000000000000080bf000080c0000000c07fc48f3e003b763f0000e0c0000000c00000e0c00000000000000000000080bf0000803f0000000000000000000080bf0000e0c0000000c07fc48f3e8061643f000080c00000803f0000e0c00000000000000000000080bf0000803f0000000000000000000080bf000080c00000803f7e77b33e003b763f0000a0c00000803f0000e0c00000000000000000000080bf0000803f0000000000000000000080bf0000a0c00000803f7e77b33ed547703f0000e0c0000000c00000e0c03f0155bfd5000e3f000000000000000000000000000080bf000080bf0000a0400a81b1c092add93e8a60173f0000e0c0000000c0000080c03f0155bfd5000e3f000000000000000000000000000080bf000080bf000080400a81b1c092add93e0a3a293f0000a0c00000803f0000e0c03f0155bfd5000e3f000000000000000000000000000080bf000080bf0000a0407481f8bfddc5ae3e8960173f0000a0c00000803f000080c03f0155bfd5000e3f000000000000000000000000000080bf000080bf000080407481f8bfdcc5ae3e093a293f0000a0c00000803f000080c0000000000000803f000000000000803f0000000000000000000080bf0000a0c0000080c0dcc5ae3e093a293f000080c00000803f000080c0000000000000803f000000000000803f0000000000000000000080bf000080c0000080c088dfa23e093a293f0000a0c00000803f0000e0c0000000000000803f000000000000803f0000000000000000000080bf0000a0c00000a0c0ddc5ae3e8960173f000080c00000803f0000e0c0000000000000803f000000000000803f0000000000000000000080bf000080c00000a0c088dfa23e8960173f0000e0c0000000c00000e0c000000000000080bf00000000000080bf0000000000000000000080bf0000e0400000a0c0ef67e13e1071363f000080c0000000c00000e0c000000000000080bf00000000000080bf0000000000000000000080bf000080400000a0c0ef67e13e904a483f0000e0c0000000c0000080c000000000000080bf00000000000080bf0000000000000000000080bf0000e040000080c0f0b4bd3e1071363f000080c0000000c0000080c000000000000080bf00000000000080bf0000000000000000000080bf00008040000080c0f0b4bd3e904a483f - 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, y: 0, z: 0} - m_Extent: {x: 10, y: 3, z: 10} - m_MeshUsageFlags: 0 - m_BakedConvexCollisionMesh: - m_BakedTriangleCollisionMesh: - m_MeshMetrics[0]: 1 - m_MeshMetrics[1]: 1 - m_MeshOptimizationFlags: 1 - m_StreamData: - offset: 0 - size: 0 - path: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.asset.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.asset.meta deleted file mode 100644 index a464a36bb..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 39ca96bd67a9a8849a1c06e8b5e7a5c9 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 4300000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.prefab b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.prefab deleted file mode 100644 index 5175c09d6..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.prefab +++ /dev/null @@ -1,165 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1807824197224447177 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6355862402819174107} - - component: {fileID: 1550045192011495150} - - component: {fileID: 4833510063135446916} - - component: {fileID: 7215318252446853067} - - component: {fileID: 7215318252446853068} - - component: {fileID: 7215318252446853069} - - component: {fileID: 7215318252446853070} - - component: {fileID: 7215318252446853071} - - component: {fileID: 7215318252446853072} - m_Layer: 0 - m_Name: Environment - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 1 - m_IsActive: 1 ---- !u!4 &6355862402819174107 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1807824197224447177} - 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &1550045192011495150 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1807824197224447177} - m_Mesh: {fileID: 4300000, guid: 39ca96bd67a9a8849a1c06e8b5e7a5c9, type: 2} ---- !u!23 &4833510063135446916 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1807824197224447177} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 0a79fb9ef489c6f499e041e89836a841, 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: 2 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!65 &7215318252446853067 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1807824197224447177} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.5, y: 4.5, z: 0.49999952} - m_Center: {x: -4.75, y: 0.25, z: 1.7500002} ---- !u!65 &7215318252446853068 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1807824197224447177} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 20, y: 1, z: 20} - m_Center: {x: 0, y: -2.5, z: 0} ---- !u!65 &7215318252446853069 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1807824197224447177} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 3, y: 3.9999998, z: 3} - m_Center: {x: -5.5, y: -1.0000001, z: -5.5} ---- !u!65 &7215318252446853070 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1807824197224447177} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.5, y: 0.5, z: 6.499998} - m_Center: {x: -4.75, y: 2.75, z: 4.750001} ---- !u!65 &7215318252446853071 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1807824197224447177} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.5, y: 4.5, z: 0.4999981} - m_Center: {x: -4.75, y: 0.25, z: 7.750001} ---- !u!65 &7215318252446853072 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1807824197224447177} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 3, y: 3.9999998, z: 3} - m_Center: {x: 5.5, y: -1.0000001, z: -5.5} diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.prefab.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.prefab.meta deleted file mode 100644 index 9f188c78f..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Environment/Environment.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: fc3b5a3644d842a44a1bc8eb5e72a975 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main 1.unity b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main 1.unity deleted file mode 100644 index 253fd8cf0..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main 1.unity +++ /dev/null @@ -1,863 +0,0 @@ -%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: 10 - 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.37286404, g: 0.4026641, b: 0.46226418, 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: 0.4 - m_AmbientMode: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 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: 705507994} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 1 - 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_ReflectionCompression: 2 - m_MixedBakeMode: 0 - m_BakeBackend: 2 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - 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: 112000000, guid: 3feeca0c11fd0d84aa1834e0e22da648, type: 2} - m_LightingSettings: {fileID: 2073191939} ---- !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 &562189915 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 562189922} - - component: {fileID: 562189921} - - component: {fileID: 562189920} - - component: {fileID: 562189919} - - component: {fileID: 562189918} - m_Layer: 0 - m_Name: Swing1 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &562189918 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 562189915} - serializedVersion: 5 - m_Mass: 1 - m_LinearDamping: 0 - m_AngularDamping: 0.5 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!65 &562189919 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 562189915} - 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 &562189920 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 562189915} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: e26b4c54b2b9d934e9bbba88b5f9b449, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &562189921 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 562189915} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &562189922 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 562189915} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0.7071067, w: 0.70710695} - m_LocalPosition: {x: -3.47, y: -0, z: 0.9375} - m_LocalScale: {x: 1, y: 0.20000012, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 906432239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90.00001} ---- !u!1 &705507993 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 705507995} - - component: {fileID: 705507994} - - component: {fileID: 705507996} - m_Layer: 0 - m_Name: Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &705507994 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 705507993} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 0.7 - 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: 4 - 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_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &705507995 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 705507993} - serializedVersion: 2 - m_LocalRotation: {x: 0.085324295, y: -0.8876446, z: 0.41391522, w: 0.18297842} - m_LocalPosition: {x: 0, y: 15, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 50.000004, y: -156.70401, z: 0} ---- !u!114 &705507996 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 705507993} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalLightData - m_UsePipelineSettings: 1 - m_AdditionalLightsShadowResolutionTier: 2 - m_CustomShadowLayers: 0 - m_LightCookieSize: {x: 1, y: 1} - m_LightCookieOffset: {x: 0, y: 0} - m_SoftShadowQuality: 0 - m_RenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_ShadowRenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_Version: 4 - m_LightLayerMask: 1 - m_ShadowLayerMask: 1 - m_RenderingLayers: 1 - m_ShadowRenderingLayers: 1 ---- !u!1 &906432238 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 906432239} - - component: {fileID: 906432240} - m_Layer: 0 - m_Name: Swings - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &906432239 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 906432238} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -6.09375, y: 4.5, z: 5.0625} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1197291660} - - {fileID: 562189922} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &906432240 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 906432238} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2b777331b0af4d349e55170b5dc27c78, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::NBF.RopeLenghtTest - Rope: {fileID: 1197291658} - AddValue: 0.01 ---- !u!1 &963194225 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 963194228} - - component: {fileID: 963194227} - - component: {fileID: 963194229} - - component: {fileID: 963194226} - - component: {fileID: 963194230} - m_Layer: 0 - m_Name: Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &963194226 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0383ecb7d718b4bd682ab0d0f68bce82, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!20 &963194227 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 2 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &963194228 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - serializedVersion: 2 - m_LocalRotation: {x: 0.0013921931, y: 0.9848068, z: -0.17364798, w: 0.00024548118} - m_LocalPosition: {x: 0, y: 6, z: 14} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 20, y: 180, z: 0.162} ---- !u!114 &963194229 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d741c2b5cb0190448822896128d51f8a, type: 3} - m_Name: - m_EditorClassIdentifier: - pickedMesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} - targetMesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} - pickedMaterial: {fileID: 2100000, guid: d35e58ef8c9e0e1429517c447ba73497, type: 2} - targetMaterial: {fileID: 2100000, guid: f1f2a238089ca461f9383525476c3a2b, type: 2} - maxPickDistance: 2 - maxImpulseStrength: 3 - leverage: 10 - splitPickedRopeOnKey: 32 - ropes: - - {fileID: 1197291658} ---- !u!114 &963194230 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData - m_RenderShadows: 1 - m_RequiresDepthTextureOption: 2 - m_RequiresOpaqueTextureOption: 2 - m_CameraType: 0 - m_Cameras: [] - m_RendererIndex: -1 - m_VolumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - m_VolumeTrigger: {fileID: 0} - m_VolumeFrameworkUpdateModeOption: 2 - m_RenderPostProcessing: 0 - m_Antialiasing: 0 - m_AntialiasingQuality: 2 - m_StopNaN: 0 - m_Dithering: 0 - m_ClearDepth: 1 - m_AllowXRRendering: 1 - m_AllowHDROutput: 1 - m_UseScreenCoordOverride: 0 - m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} - m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} - m_RequiresDepthTexture: 0 - m_RequiresColorTexture: 0 - m_TaaSettings: - m_Quality: 3 - m_FrameInfluence: 0.1 - m_JitterScale: 1 - m_MipBias: 0 - m_VarianceClampScale: 0.9 - m_ContrastAdaptiveSharpening: 0 - m_Version: 2 ---- !u!1 &1197291657 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1197291660} - - component: {fileID: 1197291658} - - component: {fileID: 1197291661} - - component: {fileID: 1197291659} - m_Layer: 0 - m_Name: Swing1_Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1197291658 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1197291657} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325b217b839086b4ca705834516bc0d5, type: 3} - m_Name: - m_EditorClassIdentifier: - radius: 0.01 - material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - shadowMode: 1 - spawnPoints: - - x: 0 - y: 0 - z: 0 - - x: -2.4452248 - y: 0.06797419 - z: 0.039803684 - - x: -3.4447064 - y: 0.09575853 - z: 0.056073375 - - x: -4.444188 - y: 0.12354286 - z: 0.07234307 - interpolation: 0 - simulation: - enabled: 1 - resolution: 2 - massPerMeter: 0.02 - stiffness: 1 - energyLoss: 0.005 - substeps: 2 - solverIterations: 3 - collisions: - enabled: 0 - influenceRigidbodies: 0 - stride: 2 - collisionMargin: 0.025 - ignoreLayers: - serializedVersion: 2 - m_Bits: 0 ---- !u!114 &1197291659 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1197291657} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 3 - ropeLocation: 1 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 562189918} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 0} - localConnectionPoint: - x: 0 - y: 1.25 - z: 0 ---- !u!4 &1197291660 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1197291657} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1.34375, y: -0.1, z: 0.938} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 906432239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1197291661 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1197291657} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 0 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.15 - damping: 0.05 - transformSettings: - transform: {fileID: 7215318252446853075} - localConnectionPoint: - x: -4.75 - y: 2.5 - z: 6 ---- !u!850595691 &2073191939 -LightingSettings: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 0 - m_BakeBackend: 2 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 1 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 0 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 512 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 1 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 ---- !u!1001 &7215318252446853065 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 1807824197224447177, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_Name - value: Environment - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_RootOrder - value: 11 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalPosition.y - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} ---- !u!4 &7215318252446853075 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} - m_PrefabInstance: {fileID: 7215318252446853065} - m_PrefabAsset: {fileID: 0} ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 963194228} - - {fileID: 705507995} - - {fileID: 906432239} - - {fileID: 7215318252446853065} diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main 1.unity.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main 1.unity.meta deleted file mode 100644 index a06f8306e..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main 1.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3a8359e6e75ad814fa648556ce4fba40 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main.unity b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main.unity index 565ba3ce1..e0ae6255b 100644 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main.unity +++ b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Main.unity @@ -159,6 +159,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &47437488 Rigidbody: m_ObjectHideFlags: 0 @@ -707,6 +714,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &359954497 Rigidbody: m_ObjectHideFlags: 0 @@ -979,6 +993,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &373481827 Rigidbody: m_ObjectHideFlags: 0 @@ -1132,16 +1153,14 @@ MonoBehaviour: type: 0 ropeLocation: 1 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.15 - damping: 0.05 - transformSettings: - transform: {fileID: 7215318252446853075} + rigidbodySettings: {body: {fileID: 0}, stiffness: 0.15, damping: 0.05} + transformSettings: {transform: {fileID: 7215318252446853075}} localConnectionPoint: x: -4 y: 1 z: -7 + rope: {fileID: 0} + particleIndex: 0 --- !u!114 &400203999 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1157,16 +1176,14 @@ MonoBehaviour: type: 0 ropeLocation: 0 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.15 - damping: 0.05 - transformSettings: - transform: {fileID: 7215318252446853075} + rigidbodySettings: {body: {fileID: 0}, stiffness: 0.15, damping: 0.05} + transformSettings: {transform: {fileID: 7215318252446853075}} localConnectionPoint: x: 4 y: 1 z: -7 + rope: {fileID: 0} + particleIndex: 0 --- !u!114 &400204000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1180,13 +1197,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: radius: 0.08 - radialVertices: 6 - isLoop: 0 material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} shadowMode: 1 - rendering: - useSimpleLineRenderer: 0 - simpleLineWidth: 0.02 spawnPoints: - x: 4 y: 0 @@ -1201,24 +1213,25 @@ MonoBehaviour: massPerMeter: 5 stiffness: 0.5 energyLoss: 0.0025 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 substeps: 4 solverIterations: 3 collisions: enabled: 0 influenceRigidbodies: 0 stride: 2 - friction: 0.1 collisionMargin: 0.025 ignoreLayers: - serializedVersion: 2 m_Bits: 4 + lineRenderer: {fileID: 0} + initialized: 0 + computingSimulationFrame: 0 + simulationDisabledPrevFrame: 0 + timeSinceFixedUpdate: 0 + collisionRigidbodies: [] + collisionQueryBuffer: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} --- !u!4 &400204001 Transform: m_ObjectHideFlags: 0 @@ -1413,6 +1426,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &469541384 Rigidbody: m_ObjectHideFlags: 0 @@ -1919,6 +1939,7 @@ MonoBehaviour: relativeTorque: {x: 0, y: -100, z: 0} maxAngularSpeed: 1 key: 276 + rb: {fileID: 0} --- !u!114 &737909192 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1934,6 +1955,7 @@ MonoBehaviour: relativeTorque: {x: 0, y: 100, z: 0} maxAngularSpeed: 1 key: 275 + rb: {fileID: 0} --- !u!1 &747792303 GameObject: m_ObjectHideFlags: 0 @@ -1974,6 +1996,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &747792305 Rigidbody: m_ObjectHideFlags: 0 @@ -2133,6 +2162,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &758798862 Rigidbody: m_ObjectHideFlags: 0 @@ -2434,13 +2470,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: radius: 0.05 - radialVertices: 6 - isLoop: 0 material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} shadowMode: 1 - rendering: - useSimpleLineRenderer: 0 - simpleLineWidth: 0.02 spawnPoints: - x: 0 y: 0 @@ -2455,24 +2486,25 @@ MonoBehaviour: massPerMeter: 2 stiffness: 1 energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 substeps: 2 solverIterations: 2 collisions: enabled: 0 influenceRigidbodies: 0 stride: 2 - friction: 0.1 collisionMargin: 0.025 ignoreLayers: - serializedVersion: 2 m_Bits: 0 + lineRenderer: {fileID: 0} + initialized: 0 + computingSimulationFrame: 0 + simulationDisabledPrevFrame: 0 + timeSinceFixedUpdate: 0 + collisionRigidbodies: [] + collisionQueryBuffer: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} --- !u!114 &907597905 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2488,16 +2520,14 @@ MonoBehaviour: type: 0 ropeLocation: 0 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.15 - damping: 0.05 - transformSettings: - transform: {fileID: 7215318252446853075} + rigidbodySettings: {body: {fileID: 0}, stiffness: 0.15, damping: 0.05} + transformSettings: {transform: {fileID: 7215318252446853075}} localConnectionPoint: x: -4.75 y: 2.5 z: 2.5 + rope: {fileID: 0} + particleIndex: 0 --- !u!4 &907597906 Transform: m_ObjectHideFlags: 0 @@ -2528,16 +2558,14 @@ MonoBehaviour: type: 3 ropeLocation: 1 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 1047506054} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 0} + rigidbodySettings: {body: {fileID: 1047506054}, stiffness: 0.1, damping: 0.1} + transformSettings: {transform: {fileID: 0}} localConnectionPoint: x: 0 y: 1.25 z: -0.5 + rope: {fileID: 0} + particleIndex: 0 --- !u!1 &918799146 GameObject: m_ObjectHideFlags: 0 @@ -2570,13 +2598,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: radius: 0.05 - radialVertices: 6 - isLoop: 0 material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} shadowMode: 1 - rendering: - useSimpleLineRenderer: 0 - simpleLineWidth: 0.02 spawnPoints: - x: 0 y: 0 @@ -2591,24 +2614,25 @@ MonoBehaviour: massPerMeter: 2 stiffness: 1 energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 substeps: 2 solverIterations: 2 collisions: enabled: 0 influenceRigidbodies: 0 stride: 2 - friction: 0.1 collisionMargin: 0.025 ignoreLayers: - serializedVersion: 2 m_Bits: 0 + lineRenderer: {fileID: 0} + initialized: 0 + computingSimulationFrame: 0 + simulationDisabledPrevFrame: 0 + timeSinceFixedUpdate: 0 + collisionRigidbodies: [] + collisionQueryBuffer: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} --- !u!4 &918799148 Transform: m_ObjectHideFlags: 0 @@ -2639,16 +2663,14 @@ MonoBehaviour: type: 3 ropeLocation: 1 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 1047506054} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 0} + rigidbodySettings: {body: {fileID: 1047506054}, stiffness: 0.1, damping: 0.1} + transformSettings: {transform: {fileID: 0}} localConnectionPoint: x: 0 y: 1.25 z: 0.5 + rope: {fileID: 0} + particleIndex: 0 --- !u!114 &918799151 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2664,16 +2686,14 @@ MonoBehaviour: type: 0 ropeLocation: 0 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.15 - damping: 0.05 - transformSettings: - transform: {fileID: 7215318252446853075} + rigidbodySettings: {body: {fileID: 0}, stiffness: 0.15, damping: 0.05} + transformSettings: {transform: {fileID: 7215318252446853075}} localConnectionPoint: x: -4.75 y: 2.5 z: 4.5 + rope: {fileID: 0} + particleIndex: 0 --- !u!1 &949798694 GameObject: m_ObjectHideFlags: 0 @@ -2844,6 +2864,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0383ecb7d718b4bd682ab0d0f68bce82, type: 3} m_Name: m_EditorClassIdentifier: + desiredMaxImpulseStrength: 0 + guiRect: + x: 10 + y: 10 + width: 200 + height: 0 --- !u!20 &963194227 Camera: m_ObjectHideFlags: 0 @@ -2938,6 +2964,18 @@ MonoBehaviour: - {fileID: 1106616806} - {fileID: 1197291658} - {fileID: 1750375684} + ready: 0 + rope: {fileID: 0} + particle: 0 + distance: 0 + pickedPosition: + x: 0 + y: 0 + z: 0 + targetPosition: + x: 0 + y: 0 + z: 0 --- !u!1 &978669419 GameObject: m_ObjectHideFlags: 0 @@ -3099,6 +3137,7 @@ MonoBehaviour: relativeTorque: {x: 0, y: -20, z: 0} maxAngularSpeed: 3 key: 273 + rb: {fileID: 0} --- !u!114 &978669426 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3114,6 +3153,7 @@ MonoBehaviour: relativeTorque: {x: 0, y: 20, z: 0} maxAngularSpeed: 3 key: 274 + rb: {fileID: 0} --- !u!59 &978669427 HingeJoint: m_ObjectHideFlags: 0 @@ -3324,13 +3364,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: radius: 0.001 - radialVertices: 6 - isLoop: 0 material: {fileID: 2100000, guid: 85feedf64f0c16d4182fd4c33e342d2a, type: 2} shadowMode: 1 - rendering: - useSimpleLineRenderer: 1 - simpleLineWidth: 0.001 spawnPoints: - x: -0.90364826 y: -1.0066781 @@ -3351,24 +3386,25 @@ MonoBehaviour: massPerMeter: 2 stiffness: 1 energyLoss: 0.0025 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 substeps: 4 solverIterations: 5 collisions: enabled: 1 influenceRigidbodies: 0 stride: 1 - friction: 0.2 collisionMargin: 0.025 ignoreLayers: - serializedVersion: 2 m_Bits: 4 + lineRenderer: {fileID: 0} + initialized: 0 + computingSimulationFrame: 0 + simulationDisabledPrevFrame: 0 + timeSinceFixedUpdate: 0 + collisionRigidbodies: [] + collisionQueryBuffer: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} --- !u!4 &1075857042 Transform: m_ObjectHideFlags: 0 @@ -3399,16 +3435,14 @@ MonoBehaviour: type: 3 ropeLocation: 0 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 978669420} - stiffness: 0.15 - damping: 0.05 - transformSettings: - transform: {fileID: 0} + rigidbodySettings: {body: {fileID: 978669420}, stiffness: 0.15, damping: 0.05} + transformSettings: {transform: {fileID: 0}} localConnectionPoint: x: -0.6 y: 0.6 z: 0 + rope: {fileID: 0} + particleIndex: 0 --- !u!114 &1075857045 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3424,16 +3458,14 @@ MonoBehaviour: type: 3 ropeLocation: 1 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 286835134} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 0} + rigidbodySettings: {body: {fileID: 286835134}, stiffness: 0.1, damping: 0.1} + transformSettings: {transform: {fileID: 0}} localConnectionPoint: x: 0 y: 0.5 z: 0 + rope: {fileID: 0} + particleIndex: 0 --- !u!1 &1106616804 GameObject: m_ObjectHideFlags: 0 @@ -3479,13 +3511,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: radius: 0.08 - radialVertices: 6 - isLoop: 1 material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} shadowMode: 1 - rendering: - useSimpleLineRenderer: 0 - simpleLineWidth: 0.02 spawnPoints: - x: 0 y: 0 @@ -3506,24 +3533,25 @@ MonoBehaviour: massPerMeter: 1 stiffness: 1 energyLoss: 0.0025 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: 0 - z: 0 substeps: 4 solverIterations: 2 collisions: enabled: 1 influenceRigidbodies: 0 stride: 1 - friction: 1 collisionMargin: 0.025 ignoreLayers: - serializedVersion: 2 m_Bits: 0 + lineRenderer: {fileID: 0} + initialized: 0 + computingSimulationFrame: 0 + simulationDisabledPrevFrame: 0 + timeSinceFixedUpdate: 0 + collisionRigidbodies: [] + collisionQueryBuffer: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} --- !u!1 &1131199966 GameObject: m_ObjectHideFlags: 0 @@ -3778,13 +3806,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: radius: 0.05 - radialVertices: 6 - isLoop: 0 material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} shadowMode: 1 - rendering: - useSimpleLineRenderer: 1 - simpleLineWidth: 0.02 spawnPoints: - x: 0 y: 0 @@ -3799,24 +3822,25 @@ MonoBehaviour: massPerMeter: 2 stiffness: 1 energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 substeps: 2 solverIterations: 3 collisions: enabled: 0 influenceRigidbodies: 0 stride: 2 - friction: 0.1 collisionMargin: 0.025 ignoreLayers: - serializedVersion: 2 m_Bits: 0 + lineRenderer: {fileID: 0} + initialized: 0 + computingSimulationFrame: 0 + simulationDisabledPrevFrame: 0 + timeSinceFixedUpdate: 0 + collisionRigidbodies: [] + collisionQueryBuffer: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} --- !u!114 &1197291659 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3832,16 +3856,14 @@ MonoBehaviour: type: 3 ropeLocation: 1 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 562189918} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 0} + rigidbodySettings: {body: {fileID: 562189918}, stiffness: 0.1, damping: 0.1} + transformSettings: {transform: {fileID: 0}} localConnectionPoint: x: 0 y: 1.25 z: 0 + rope: {fileID: 0} + particleIndex: 0 --- !u!4 &1197291660 Transform: m_ObjectHideFlags: 0 @@ -3872,16 +3894,14 @@ MonoBehaviour: type: 0 ropeLocation: 0 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.15 - damping: 0.05 - transformSettings: - transform: {fileID: 7215318252446853075} + rigidbodySettings: {body: {fileID: 0}, stiffness: 0.15, damping: 0.05} + transformSettings: {transform: {fileID: 7215318252446853075}} localConnectionPoint: x: -4.75 y: 2.5 z: 6 + rope: {fileID: 0} + particleIndex: 0 --- !u!1 &1249080564 GameObject: m_ObjectHideFlags: 0 @@ -3922,6 +3942,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &1249080566 Rigidbody: m_ObjectHideFlags: 0 @@ -4192,6 +4219,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &1414773578 Rigidbody: m_ObjectHideFlags: 0 @@ -4351,6 +4385,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &1433579692 Rigidbody: m_ObjectHideFlags: 0 @@ -4893,6 +4934,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &1577910159 Rigidbody: m_ObjectHideFlags: 0 @@ -5157,16 +5205,14 @@ MonoBehaviour: type: 0 ropeLocation: 1 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.15 - damping: 0.05 - transformSettings: - transform: {fileID: 7215318252446853075} + rigidbodySettings: {body: {fileID: 0}, stiffness: 0.15, damping: 0.05} + transformSettings: {transform: {fileID: 7215318252446853075}} localConnectionPoint: x: -4 y: 1 z: -4 + rope: {fileID: 0} + particleIndex: 0 --- !u!114 &1750375681 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5182,16 +5228,14 @@ MonoBehaviour: type: 0 ropeLocation: 0 autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.15 - damping: 0.05 - transformSettings: - transform: {fileID: 7215318252446853075} + rigidbodySettings: {body: {fileID: 0}, stiffness: 0.15, damping: 0.05} + transformSettings: {transform: {fileID: 7215318252446853075}} localConnectionPoint: x: 4 y: 1 z: -4 + rope: {fileID: 0} + particleIndex: 0 --- !u!114 &1750375684 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5205,13 +5249,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: radius: 0.08 - radialVertices: 6 - isLoop: 0 material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} shadowMode: 1 - rendering: - useSimpleLineRenderer: 0 - simpleLineWidth: 0.02 spawnPoints: - x: 4 y: 0 @@ -5232,24 +5271,25 @@ MonoBehaviour: massPerMeter: 5 stiffness: 0.5 energyLoss: 0.0025 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 substeps: 4 solverIterations: 3 collisions: enabled: 0 influenceRigidbodies: 0 stride: 2 - friction: 0.1 collisionMargin: 0.025 ignoreLayers: - serializedVersion: 2 m_Bits: 4 + lineRenderer: {fileID: 0} + initialized: 0 + computingSimulationFrame: 0 + simulationDisabledPrevFrame: 0 + timeSinceFixedUpdate: 0 + collisionRigidbodies: [] + collisionQueryBuffer: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} --- !u!4 &1750375685 Transform: m_ObjectHideFlags: 0 @@ -5416,6 +5456,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &1780939416 Rigidbody: m_ObjectHideFlags: 0 @@ -5575,6 +5622,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &1798096254 Rigidbody: m_ObjectHideFlags: 0 @@ -5845,6 +5899,13 @@ MonoBehaviour: extentPivot: 0.5 longitudalStiffness: 0.25 restingRigidbodyMassMultiplier: 5 + rb: {fileID: 0} + particleLeft: 0 + particleRight: 0 + particlePivotLeft: 0 + particlePivotRight: 0 + distance: 0 + frameTotalMass: 0 --- !u!54 &1947032008 Rigidbody: m_ObjectHideFlags: 0 @@ -5964,6 +6025,30 @@ Transform: m_Children: [] m_Father: {fileID: 1524251173} m_LocalEulerAnglesHint: {x: 0, y: 90.00001, z: 0} +--- !u!1 &1971561613 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 1807824197224447177, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} + m_PrefabInstance: {fileID: 7215318252446853065} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7215318252446853075} + - component: {fileID: 7215318252446853083} + - component: {fileID: 7215318252446853082} + - component: {fileID: 7215318252446853081} + - component: {fileID: 7215318252446853080} + - component: {fileID: 7215318252446853079} + - component: {fileID: 7215318252446853078} + - component: {fileID: 7215318252446853077} + - component: {fileID: 7215318252446853076} + m_Layer: 0 + m_Name: Environment + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 1 + m_IsActive: 1 --- !u!1 &1985356212 GameObject: m_ObjectHideFlags: 0 @@ -6423,11 +6508,203 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} ---- !u!4 &7215318252446853075 stripped +--- !u!4 &7215318252446853075 Transform: + m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 6355862402819174107, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} m_PrefabInstance: {fileID: 7215318252446853065} m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971561613} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &7215318252446853076 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 7215318252446853072, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} + m_PrefabInstance: {fileID: 7215318252446853065} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971561613} + 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: 3, y: 3.9999998, z: 3} + m_Center: {x: 5.5, y: -1.0000001, z: -5.5} +--- !u!65 &7215318252446853077 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 7215318252446853071, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} + m_PrefabInstance: {fileID: 7215318252446853065} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971561613} + 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: 0.5, y: 4.5, z: 0.4999981} + m_Center: {x: -4.75, y: 0.25, z: 7.750001} +--- !u!65 &7215318252446853078 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 7215318252446853070, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} + m_PrefabInstance: {fileID: 7215318252446853065} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971561613} + 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: 0.5, y: 0.5, z: 6.499998} + m_Center: {x: -4.75, y: 2.75, z: 4.750001} +--- !u!65 &7215318252446853079 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 7215318252446853069, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} + m_PrefabInstance: {fileID: 7215318252446853065} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971561613} + 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: 3, y: 3.9999998, z: 3} + m_Center: {x: -5.5, y: -1.0000001, z: -5.5} +--- !u!65 &7215318252446853080 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 7215318252446853068, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} + m_PrefabInstance: {fileID: 7215318252446853065} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971561613} + 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: 20, y: 1, z: 20} + m_Center: {x: 0, y: -2.5, z: 0} +--- !u!65 &7215318252446853081 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 7215318252446853067, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} + m_PrefabInstance: {fileID: 7215318252446853065} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971561613} + 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: 0.5, y: 4.5, z: 0.49999952} + m_Center: {x: -4.75, y: 0.25, z: 1.7500002} +--- !u!23 &7215318252446853082 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 4833510063135446916, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} + m_PrefabInstance: {fileID: 7215318252446853065} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971561613} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0a79fb9ef489c6f499e041e89836a841, 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: 2 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &7215318252446853083 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 1550045192011495150, guid: fc3b5a3644d842a44a1bc8eb5e72a975, type: 3} + m_PrefabInstance: {fileID: 7215318252446853065} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971561613} + m_Mesh: {fileID: 4300000, guid: 39ca96bd67a9a8849a1c06e8b5e7a5c9, type: 2} --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials.meta deleted file mode 100644 index 9a0914e56..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 419c43e82b41f804d988778df605183a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Chain.mat b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Chain.mat deleted file mode 100644 index c3604210f..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Chain.mat +++ /dev/null @@ -1,139 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Chain - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 1 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 4, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AddPrecomputedVelocity: 0 - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 1 - - _Glossiness: 0 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 ---- !u!114 &2579454104811510204 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion - version: 10 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Chain.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Chain.mat.meta deleted file mode 100644 index f920af087..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Chain.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 85feedf64f0c16d4182fd4c33e342d2a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Checker.png b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Checker.png deleted file mode 100644 index 6758835f9..000000000 Binary files a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Checker.png and /dev/null differ diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Checker.png.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Checker.png.meta deleted file mode 100644 index def69295a..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Checker.png.meta +++ /dev/null @@ -1,90 +0,0 @@ -fileFormatVersion: 2 -guid: b03a2c419a85b4840a89514be8b05bfd -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 10 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Environment.mat b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Environment.mat deleted file mode 100644 index 0ac0b824f..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Environment.mat +++ /dev/null @@ -1,140 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Environment - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _DETAIL_MULX2 - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 2800000, guid: b03a2c419a85b4840a89514be8b05bfd, type: 3} - m_Scale: {x: 40, y: 40} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AddPrecomputedVelocity: 0 - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 0 - - _Glossiness: 0 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 1 - - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.6132076, g: 0.6132076, b: 0.6132076, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 ---- !u!114 &5545626930051578360 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion - version: 10 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Environment.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Environment.mat.meta deleted file mode 100644 index ba465adc0..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Environment.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0a79fb9ef489c6f499e041e89836a841 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/PickedIndicator.mat b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/PickedIndicator.mat deleted file mode 100644 index 0d7c2a1f2..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/PickedIndicator.mat +++ /dev/null @@ -1,141 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: PickedIndicator - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - - _SPECULARHIGHLIGHTS_OFF - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 1 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AddPrecomputedVelocity: 0 - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 1 - - _Glossiness: 0 - - _GlossyReflections: 0 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 1 - - _SpecularHighlights: 0 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 ---- !u!114 &8815966263303209791 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion - version: 10 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/PickedIndicator.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/PickedIndicator.mat.meta deleted file mode 100644 index 4e323954d..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/PickedIndicator.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d35e58ef8c9e0e1429517c447ba73497 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Plank.mat b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Plank.mat deleted file mode 100644 index 1fa064671..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Plank.mat +++ /dev/null @@ -1,140 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Plank - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SPECULARHIGHLIGHTS_OFF - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AddPrecomputedVelocity: 0 - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 1 - - _Glossiness: 0 - - _GlossyReflections: 0 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 0 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 ---- !u!114 &765885419054481354 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion - version: 10 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Plank.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Plank.mat.meta deleted file mode 100644 index 7cb9fd030..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Plank.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b908b9053476d604fae11ed6727c9902 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rigidbody.mat b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rigidbody.mat deleted file mode 100644 index 68cdbbae7..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rigidbody.mat +++ /dev/null @@ -1,141 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-763135438911210145 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion - version: 10 ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Rigidbody - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SPECULARHIGHLIGHTS_OFF - m_InvalidKeywords: - - _GLOSSYREFLECTIONS_OFF - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AddPrecomputedVelocity: 0 - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 1 - - _Glossiness: 0 - - _GlossyReflections: 0 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 0 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 0.8301887, g: 0.8301887, b: 0.8301887, a: 1} - - _Color: {r: 0.8301887, g: 0.8301887, b: 0.8301887, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rigidbody.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rigidbody.mat.meta deleted file mode 100644 index 0339feffc..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rigidbody.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e26b4c54b2b9d934e9bbba88b5f9b449 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rope.mat b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rope.mat deleted file mode 100644 index 96f9d5549..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rope.mat +++ /dev/null @@ -1,139 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Rope - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 4, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AddPrecomputedVelocity: 0 - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 1 - - _Glossiness: 0 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 0.83, g: 0.5958974, b: 0.36179486, a: 1} - - _Color: {r: 0.83, g: 0.5958974, b: 0.36179483, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 ---- !u!114 &8466111474512429427 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion - version: 10 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rope.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rope.mat.meta deleted file mode 100644 index 3c260819a..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Rope.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 189732c736fdb544f98524f96c34aff6 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Sky.mat b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Sky.mat deleted file mode 100644 index cda02ec6d..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Sky.mat +++ /dev/null @@ -1,84 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Sky - m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: _SUNDISK_HIGH_QUALITY - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _AtmosphereThickness: 1 - - _BumpScale: 1 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _Exposure: 1.3 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SunDisk: 2 - - _SunSize: 0.04 - - _SunSizeConvergence: 5 - - _UVSec: 0 - - _ZWrite: 1 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _GroundColor: {r: 0.51139194, g: 0.6415094, b: 0.55893487, a: 1} - - _SkyTint: {r: 0.5, g: 0.5, b: 0.5, a: 1} diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Sky.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Sky.mat.meta deleted file mode 100644 index a3700f809..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/Sky.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8fe2b67874cb22f43800c75dcf38673f -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/TargetIndicator.mat b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/TargetIndicator.mat deleted file mode 100644 index 4d6a5bdc5..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/TargetIndicator.mat +++ /dev/null @@ -1,142 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: TargetIndicator - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - - _SPECULARHIGHLIGHTS_OFF - m_InvalidKeywords: - - _GLOSSYREFLECTIONS_OFF - m_LightmapFlags: 4 - m_EnableInstancingVariants: 1 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AddPrecomputedVelocity: 0 - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 1 - - _Glossiness: 0 - - _GlossyReflections: 0 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - - _SmoothnessTextureChannel: 1 - - _SpecularHighlights: 0 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 1, g: 0, b: 0, a: 1} - - _Color: {r: 1, g: 0, b: 0, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 ---- !u!114 &2538396416694341757 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion - version: 10 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/TargetIndicator.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/TargetIndicator.mat.meta deleted file mode 100644 index 194714a11..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Materials/TargetIndicator.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f1f2a238089ca461f9383525476c3a2b -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Models.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Models.meta deleted file mode 100644 index f72009cbd..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Models.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c7d88827e637e814c9839af75749cce3 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Models/Chain.fbx b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Models/Chain.fbx deleted file mode 100644 index 8c5f31e82..000000000 Binary files a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Models/Chain.fbx and /dev/null differ diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Models/Chain.fbx.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Models/Chain.fbx.meta deleted file mode 100644 index 2cb76dfef..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/Models/Chain.fbx.meta +++ /dev/null @@ -1,94 +0,0 @@ -fileFormatVersion: 2 -guid: dc3ad6005b4f0514982b05eb88b9ed3f -ModelImporter: - serializedVersion: 25 - internalIDToNameTable: [] - externalObjects: {} - materials: - importMaterials: 0 - materialName: 0 - materialSearch: 1 - materialLocation: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - resampleCurves: 1 - optimizeGameObjects: 0 - motionNodeName: - rigImportErrors: - rigImportWarnings: - animationImportErrors: - animationImportWarnings: - animationRetargetingWarnings: - animationDoRetargetingWarnings: 0 - importAnimatedCustomProperties: 0 - importConstraints: 0 - animationCompression: 1 - animationRotationError: 0.5 - animationPositionError: 0.5 - animationScaleError: 0.5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - extraUserProperties: [] - clipAnimations: [] - isReadable: 0 - meshes: - lODScreenPercentages: [] - globalScale: 1 - meshCompression: 0 - addColliders: 0 - useSRGBMaterialColor: 0 - importVisibility: 1 - importBlendShapes: 1 - importCameras: 1 - importLights: 1 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - keepQuads: 0 - weldVertices: 1 - preserveHierarchy: 0 - skinWeightsMode: 0 - maxBonesPerVertex: 4 - minBoneWeight: 0.001 - meshOptimizationFlags: -1 - indexFormat: 0 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVPackMargin: 4 - useFileScale: 1 - tangentSpace: - normalSmoothAngle: 60 - normalImportMode: 0 - tangentImportMode: 3 - normalCalculationMode: 4 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - referencedClips: [] - importAnimation: 0 - copyAvatar: 0 - humanDescription: - serializedVersion: 3 - human: [] - skeleton: [] - armTwist: 0.5 - foreArmTwist: 0.5 - upperLegTwist: 0.5 - legTwist: 0.5 - armStretch: 0.05 - legStretch: 0.05 - feetSpacing: 0 - globalScale: 1 - rootMotionBoneName: - hasTranslationDoF: 0 - hasExtraRoot: 0 - skeletonHasParents: 1 - lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 0 - humanoidOversampling: 1 - additionalBone: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/New.unity b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/New.unity deleted file mode 100644 index cf39af349..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/New.unity +++ /dev/null @@ -1,503 +0,0 @@ -%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: 10 - 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: 13 - m_BakeOnSceneLoad: 0 - 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_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: 20201, guid: 0000000000000000f000000000000000, type: 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 &203844586 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 203844589} - - component: {fileID: 203844588} - - component: {fileID: 203844587} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &203844587 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 203844586} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UsePipelineSettings: 1 - m_AdditionalLightsShadowResolutionTier: 2 - m_CustomShadowLayers: 0 - m_LightCookieSize: {x: 1, y: 1} - m_LightCookieOffset: {x: 0, y: 0} - m_SoftShadowQuality: 0 - m_RenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_ShadowRenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_Version: 4 - m_LightLayerMask: 1 - m_ShadowLayerMask: 1 - m_RenderingLayers: 1 - m_ShadowRenderingLayers: 1 ---- !u!108 &203844588 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 203844586} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - 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: 4 - 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_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &203844589 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 203844586} - 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: 0} - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &961739749 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 961739753} - - component: {fileID: 961739752} - - component: {fileID: 961739751} - - component: {fileID: 961739750} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &961739750 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 961739749} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_RenderShadows: 1 - m_RequiresDepthTextureOption: 2 - m_RequiresOpaqueTextureOption: 2 - m_CameraType: 0 - m_Cameras: [] - m_RendererIndex: -1 - m_VolumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - m_VolumeTrigger: {fileID: 0} - m_VolumeFrameworkUpdateModeOption: 2 - m_RenderPostProcessing: 0 - m_Antialiasing: 0 - m_AntialiasingQuality: 2 - m_StopNaN: 0 - m_Dithering: 0 - m_ClearDepth: 1 - m_AllowXRRendering: 1 - m_AllowHDROutput: 1 - m_UseScreenCoordOverride: 0 - m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} - m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} - m_RequiresDepthTexture: 0 - m_RequiresColorTexture: 0 - m_TaaSettings: - m_Quality: 3 - m_FrameInfluence: 0.1 - m_JitterScale: 1 - m_MipBias: 0 - m_VarianceClampScale: 0.9 - m_ContrastAdaptiveSharpening: 0 - m_Version: 2 ---- !u!81 &961739751 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 961739749} - m_Enabled: 1 ---- !u!20 &961739752 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 961739749} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &961739753 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 961739749} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 3.56, z: -5.21} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1619065651 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1619065655} - - component: {fileID: 1619065654} - - component: {fileID: 1619065653} - - component: {fileID: 1619065652} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1619065652 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1619065651} - 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 &1619065653 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1619065651} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1619065654 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1619065651} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1619065655 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1619065651} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 50, y: 0.2, z: 50} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 961739753} - - {fileID: 203844589} - - {fileID: 1619065655} diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/New.unity.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/New.unity.meta deleted file mode 100644 index dcbcf397c..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/New.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 30247964b93529147b0e83456f80e89c -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeBridgePlank.cs b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeBridgePlank.cs deleted file mode 100644 index c2987906b..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeBridgePlank.cs +++ /dev/null @@ -1,123 +0,0 @@ -using UnityEngine; -using Unity.Mathematics; - -namespace NBF.Example -{ - [RequireComponent(typeof(Rigidbody))] - public class RopeBridgePlank : MonoBehaviour - { - public Rope ropeLeft; - public Rope ropeRight; - public float extentLeft = -0.5f; - public float extentRight = 0.5f; - public float extentPivot = 0.5f; - - [Tooltip("A measure of the longitudal stiffness of the plank. That is, how quickly should the particles on the opposite ropes move to the correct distance between them.")] - [Range(0.0f, 1.0f)] public float longitudalStiffness = 0.25f; - - public float restingRigidbodyMassMultiplier = 5.0f; - - protected Rigidbody rb; - protected int particleLeft; - protected int particleRight; - protected int particlePivotLeft; - protected int particlePivotRight; - protected float distance; - protected float frameTotalMass; - - public void Start() - { - rb = GetComponent(); - if (rb != null) - { - rb.isKinematic = true; - } - - var pointOnBodyLeft = transform.TransformPoint(Vector3.right * extentLeft); - var pointOnBodyRight = transform.TransformPoint(Vector3.right * extentRight); - var pointOnBodyPivot = transform.TransformPoint(Vector3.forward * extentPivot); - - if (ropeLeft != null) - { - ropeLeft.GetClosestParticle(pointOnBodyLeft, out particleLeft, out float distance); - ropeLeft.GetClosestParticle(pointOnBodyPivot, out particlePivotLeft, out distance); - } - if (ropeRight != null) - { - ropeRight.GetClosestParticle(pointOnBodyRight, out particleRight, out float distance); - ropeRight.GetClosestParticle(pointOnBodyPivot, out particlePivotRight, out distance); - } - - if (ropeLeft != null && ropeRight != null) - { - distance = math.distance(ropeLeft.GetPositionAt(particleLeft), ropeRight.GetPositionAt(particleRight)); - } - } - - public void FixedUpdate() - { - if (rb == null) - { - return; - } - if (ropeLeft == null || ropeRight == null) - { - rb.isKinematic = false; - return; - } - - var left = ropeLeft.GetPositionAt(particleLeft); - var right = ropeRight.GetPositionAt(particleRight); - var pivot = (ropeLeft.GetPositionAt(particlePivotLeft) + ropeRight.GetPositionAt(particlePivotRight)) * 0.5f; - - left.KeepAtDistance(ref right, distance, longitudalStiffness); - - var middle = (left + right) * 0.5f; - - rb.MoveRotation(Quaternion.LookRotation(pivot - middle, Vector3.Cross(pivot - middle, right - left))); - rb.MovePosition((Vector3)middle - transform.TransformVector(Vector3.right * (extentLeft + extentRight) * 0.5f)); - - ropeLeft.SetPositionAt(particleLeft, left); - ropeRight.SetPositionAt(particleRight, right); - - var massMultiplier = 1.0f + frameTotalMass * restingRigidbodyMassMultiplier; - frameTotalMass = 0.0f; - - if (ropeLeft.GetMassMultiplierAt(particleLeft) > 0.0f) - { - ropeLeft.SetMassMultiplierAt(particleLeft, massMultiplier); - } - if (ropeRight.GetMassMultiplierAt(particleRight) > 0.0f) - { - ropeRight.SetMassMultiplierAt(particleRight, massMultiplier); - } - } - - public void OnCollisionStay(Collision collision) - { - if (collision.rigidbody != null) - { - frameTotalMass += collision.rigidbody.mass; - } - } - -#if UNITY_EDITOR - public void OnDrawGizmosSelected() - { - var pointOnBodyLeft = transform.TransformPoint(Vector3.right * extentLeft); - var pointOnBodyRight = transform.TransformPoint(Vector3.right * extentRight); - var pointOnBodyPivot = transform.TransformPoint(Vector3.forward * extentPivot); - - Gizmos.color = Color.red; - Gizmos.DrawWireSphere(pointOnBodyLeft, 0.05f); - Gizmos.DrawWireSphere(pointOnBodyRight, 0.05f); - Gizmos.DrawLine(pointOnBodyLeft, pointOnBodyRight); - - Gizmos.color = Color.blue; - Gizmos.DrawWireSphere(pointOnBodyPivot, 0.05f); - Gizmos.DrawLine(pointOnBodyLeft, pointOnBodyPivot); - Gizmos.DrawLine(pointOnBodyRight, pointOnBodyPivot); - } -#endif - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeBridgePlank.cs.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeBridgePlank.cs.meta deleted file mode 100644 index 509ad5dd9..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeBridgePlank.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a91ac0b60b8b4d4eba00ef9563d2003 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeLenghtTest.cs b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeLenghtTest.cs deleted file mode 100644 index 9796617b6..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeLenghtTest.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using UnityEngine; - -namespace NBF -{ - public class RopeLenghtTest : MonoBehaviour - { - public Rope Rope; - public float AddValue = 0.01f; - private void Update() - { - if (Input.GetKeyDown(KeyCode.A)) - { - // Rope.Retract(AddValue); - Rope.PopSpawnPoint(); - } - - if (Input.GetKeyDown(KeyCode.D)) - { - // Rope.Extend(AddValue); - Rope.PushSpawnPoint(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeLenghtTest.cs.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeLenghtTest.cs.meta deleted file mode 100644 index d8b90cafb..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeLenghtTest.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 2b777331b0af4d349e55170b5dc27c78 -timeCreated: 1762329894 \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene.meta deleted file mode 100644 index 71e319a28..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: de6eaa42470305f4387d207e869cac1e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/LightingData.asset b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/LightingData.asset deleted file mode 100644 index fea189422..000000000 Binary files a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/LightingData.asset and /dev/null differ diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/LightingData.asset.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/LightingData.asset.meta deleted file mode 100644 index 46e91975c..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/LightingData.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3feeca0c11fd0d84aa1834e0e22da648 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/ReflectionProbe-0.exr b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/ReflectionProbe-0.exr deleted file mode 100644 index 7643f7f92..000000000 Binary files a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/ReflectionProbe-0.exr and /dev/null differ diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/ReflectionProbe-0.exr.meta b/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/ReflectionProbe-0.exr.meta deleted file mode 100644 index 685f54203..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/00_Main/RopeScene/ReflectionProbe-0.exr.meta +++ /dev/null @@ -1,92 +0,0 @@ -fileFormatVersion: 2 -guid: 81c0b82e5d054694c950a9710e93c3ca -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 1 - seamlessCubemap: 1 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 2 - aniso: 0 - mipBias: 0 - wrapU: 1 - wrapV: 1 - wrapW: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 2 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 100 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach.meta b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach.meta deleted file mode 100644 index c72861245..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bdff8c3d11d364e329c121bae08cb6ab -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/BackAndForthMovement.cs b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/BackAndForthMovement.cs deleted file mode 100644 index 5d3180f83..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/BackAndForthMovement.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace NBF.Example -{ - public class BackAndForthMovement : MonoBehaviour - { - public Vector3 amount = new Vector3(2.0f, 0.0f, 0.0f); - - protected Vector3 startPos; - - public void Start() - { - startPos = transform.position; - } - - public void Update() - { - transform.position = startPos + amount * Mathf.Sin(Time.time); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/BackAndForthMovement.cs.meta b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/BackAndForthMovement.cs.meta deleted file mode 100644 index 5af66066a..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/BackAndForthMovement.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e4453a595a14042518c9341023037a8d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.cs b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.cs deleted file mode 100644 index a1fae629d..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace NBF.Example -{ - public class DynamicAttach : MonoBehaviour - { - public Material ropeMaterial; - - public Vector3 attachPoint; - public Transform target; - public Vector3 targetAttachPoint; - - public SimpleRopeInteraction ropeInteraction; - - protected GameObject ropeObject; - - protected Rect guiRect = new Rect(Screen.width - 210, 10, 200, 0); - - public void Detach() - { - if (ropeObject) - { - Destroy(ropeObject); - } - ropeObject = null; - - if (ropeInteraction) - { - ropeInteraction.ropes.Clear(); - } - } - - public void Attach() - { - Detach(); - - ropeObject = new GameObject(); - ropeObject.name = "Rope"; - - var start = transform.TransformPoint(attachPoint); - var end = target.TransformPoint(targetAttachPoint); - - var rope = ropeObject.AddComponent(); - rope.material = ropeMaterial; - rope.spawnPoints.Add(ropeObject.transform.InverseTransformPoint(start)); - rope.spawnPoints.Add(ropeObject.transform.InverseTransformPoint(end)); - - var conn0 = ropeObject.AddComponent(); - conn0.type = RopeConnectionType.PinRopeToTransform; - conn0.ropeLocation = 0.0f; - conn0.transformSettings.transform = transform; - conn0.localConnectionPoint = attachPoint; - - var conn1 = ropeObject.AddComponent(); - conn1.type = RopeConnectionType.PinRopeToTransform; - conn1.ropeLocation = 1.0f; - conn1.transformSettings.transform = target; - conn1.localConnectionPoint = targetAttachPoint; - - if (ropeInteraction) - { - ropeInteraction.ropes.Add(rope); - } - } - - protected void Window(int id) - { - if (GUILayout.Button("Attach")) - { - Attach(); - } - if (GUILayout.Button("Detach")) - { - Detach(); - } - - GUI.enabled = false; - GUILayout.Label("Instructions: Use the buttons above to dynamically attach and detach a rope from the scene."); - GUI.enabled = true; - } - - public void OnGUI() - { - guiRect = GUILayout.Window(1, guiRect, Window, "Dynamic attach"); - } - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.cs.meta b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.cs.meta deleted file mode 100644 index 50063717c..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6ae913a7495f9445da3517bf946c1e9f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.meta b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.meta deleted file mode 100644 index 594783b9d..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 77ae7d5711108d246af147db29624f40 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.unity b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.unity deleted file mode 100644 index 57d5fba30..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.unity +++ /dev/null @@ -1,689 +0,0 @@ -%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: 10 - 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: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 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: 13 - m_BakeOnSceneLoad: 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_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: 112000000, guid: 6845e77b07ddf4e48936c563b2cb9c9a, type: 2} - m_LightingSettings: {fileID: 1476623454} ---- !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 &609470541 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 609470546} - - component: {fileID: 609470545} - - component: {fileID: 609470544} - - component: {fileID: 609470543} - - component: {fileID: 609470542} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &609470542 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 609470541} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e4453a595a14042518c9341023037a8d, type: 3} - m_Name: - m_EditorClassIdentifier: - amount: {x: 2, y: 0, z: 0} ---- !u!135 &609470543 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 609470541} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &609470544 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 609470541} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 96e3708e6a4c8cd41adfeab52a6c8498, 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &609470545 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 609470541} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &609470546 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 609470541} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &823804522 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 823804525} - - component: {fileID: 823804524} - - component: {fileID: 823804526} - - component: {fileID: 823804523} - m_Layer: 0 - m_Name: Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &823804523 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 823804522} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0383ecb7d718b4bd682ab0d0f68bce82, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!20 &823804524 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 823804522} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &823804525 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 823804522} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &823804526 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 823804522} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d741c2b5cb0190448822896128d51f8a, type: 3} - m_Name: - m_EditorClassIdentifier: - pickedMesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} - targetMesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} - pickedMaterial: {fileID: 2100000, guid: d35e58ef8c9e0e1429517c447ba73497, type: 2} - targetMaterial: {fileID: 2100000, guid: f1f2a238089ca461f9383525476c3a2b, type: 2} - maxPickDistance: 2 - maxImpulseStrength: 3 - leverage: 10 - splitPickedRopeOnKey: 32 - ropes: [] ---- !u!1 &858275400 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 858275404} - - component: {fileID: 858275403} - - component: {fileID: 858275402} - - component: {fileID: 858275401} - - component: {fileID: 858275405} - m_Layer: 0 - m_Name: Attacher - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &858275401 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 858275400} - 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 &858275402 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 858275400} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 96e3708e6a4c8cd41adfeab52a6c8498, 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &858275403 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 858275400} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &858275404 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 858275400} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 2, y: 0.5, z: 0.5} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &858275405 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 858275400} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6ae913a7495f9445da3517bf946c1e9f, type: 3} - m_Name: - m_EditorClassIdentifier: - ropeMaterial: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - attachPoint: {x: 0, y: -0.5, z: 0} - target: {fileID: 609470546} - targetAttachPoint: {x: 0, y: 0.5, z: 0} - ropeInteraction: {fileID: 823804526} ---- !u!850595691 &1476623454 -LightingSettings: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 1 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 2 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 1 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 ---- !u!1 &1579321095 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1579321097} - - component: {fileID: 1579321096} - - component: {fileID: 1579321098} - m_Layer: 0 - m_Name: Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1579321096 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1579321095} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - 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: 4 - 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_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &1579321097 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1579321095} - 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: 0} - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!114 &1579321098 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1579321095} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalLightData - m_UsePipelineSettings: 1 - m_AdditionalLightsShadowResolutionTier: 2 - m_CustomShadowLayers: 0 - m_LightCookieSize: {x: 1, y: 1} - m_LightCookieOffset: {x: 0, y: 0} - m_SoftShadowQuality: 0 - m_RenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_ShadowRenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_Version: 4 - m_LightLayerMask: 1 - m_ShadowLayerMask: 1 - m_RenderingLayers: 1 - m_ShadowRenderingLayers: 1 ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 823804525} - - {fileID: 1579321097} - - {fileID: 858275404} - - {fileID: 609470546} diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.unity.meta b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.unity.meta deleted file mode 100644 index f59b3d143..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: b95b6dec15a3f486eb7218c14664c415 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach/LightingData.asset b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach/LightingData.asset deleted file mode 100644 index 84687d49c..000000000 Binary files a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach/LightingData.asset and /dev/null differ diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach/LightingData.asset.meta b/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach/LightingData.asset.meta deleted file mode 100644 index a4611e29d..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/01_DynamicAttach/DynamicAttach/LightingData.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6845e77b07ddf4e48936c563b2cb9c9a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 112000000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing.meta b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing.meta deleted file mode 100644 index eb307a868..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b2df19aa793a345a69e9944050057067 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ball.mat b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ball.mat deleted file mode 100644 index 066397521..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ball.mat +++ /dev/null @@ -1,139 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-5372188565135992000 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion - version: 10 ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Ball - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 2800000, guid: b03a2c419a85b4840a89514be8b05bfd, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: b03a2c419a85b4840a89514be8b05bfd, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AddPrecomputedVelocity: 0 - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 1 - - _Glossiness: 0 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ball.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ball.mat.meta deleted file mode 100644 index d6f8dc5a2..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ball.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 05dfe89e2a8b04019aa2fd84b55f8c8e -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing.meta b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing.meta deleted file mode 100644 index bce50de1f..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 11c2fb45774632e45a97d249b1c25cbd -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing.unity b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing.unity deleted file mode 100644 index 1ce8b3f51..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing.unity +++ /dev/null @@ -1,2301 +0,0 @@ -%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: 10 - 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: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 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: 13 - m_BakeOnSceneLoad: 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_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: 112000000, guid: fb17f1c0387cfc242b64938cee6c6079, type: 2} - m_LightingSettings: {fileID: 1579945706} ---- !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 &70725247 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 70725251} - - component: {fileID: 70725250} - - component: {fileID: 70725249} - - component: {fileID: 70725248} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &70725248 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 70725247} - 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 &70725249 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 70725247} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 1ed915716adf4441cbc55196b3610a75, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &70725250 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 70725247} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &70725251 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 70725247} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: -0.25, z: 0} - m_LocalScale: {x: 100, y: 0.5, z: 100} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &124944109 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 124944110} - - component: {fileID: 124944111} - m_Layer: 0 - m_Name: Spawner - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &124944110 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 124944109} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.124, y: 4, z: 0.322} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &124944111 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 124944109} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d7f10005d854a49a4b3371d4701441fd, type: 3} - m_Name: - m_EditorClassIdentifier: - prefab: {fileID: 794908075} - randomRange: 0.5 - timeToSpawn: 0.5 ---- !u!1 &209634126 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 209634130} - - component: {fileID: 209634129} - - component: {fileID: 209634128} - - component: {fileID: 209634127} - m_Layer: 2 - m_Name: Corner-Bottom-Left - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &209634127 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 209634126} - 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 &209634128 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 209634126} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &209634129 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 209634126} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &209634130 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 209634126} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -3, y: 0.75, z: -3} - m_LocalScale: {x: 0.3, y: 1.5, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &289142599 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 289142603} - - component: {fileID: 289142602} - - component: {fileID: 289142601} - - component: {fileID: 289142600} - m_Layer: 2 - m_Name: Corner-Bottom-Right - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &289142600 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 289142599} - 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 &289142601 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 289142599} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &289142602 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 289142599} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &289142603 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 289142599} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: 0.75, z: -3} - m_LocalScale: {x: 0.3, y: 1.5, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &309743959 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 309743963} - - component: {fileID: 309743962} - - component: {fileID: 309743961} - - component: {fileID: 309743960} - m_Layer: 0 - m_Name: Rope-Top - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &309743960 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 309743959} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 1 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 791475874} - localConnectionPoint: - x: 0 - y: 0.3 - z: 0 ---- !u!114 &309743961 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 309743959} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 0 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 1139874703} - localConnectionPoint: - x: 0 - y: 0.3 - z: 0 ---- !u!114 &309743962 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 309743959} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325b217b839086b4ca705834516bc0d5, type: 3} - m_Name: - m_EditorClassIdentifier: - radius: 0.05 - radialVertices: 6 - isLoop: 0 - material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - shadowMode: 1 - customMesh: - mesh: {fileID: 0} - rotation: 90 - scale: {x: 1, y: 1, z: 1} - stretch: 0 - spawnPoints: - - x: -3 - y: 0 - z: 0 - - x: 3 - y: 0 - z: 0 - interpolation: 0 - simulation: - enabled: 1 - resolution: 5 - massPerMeter: 3 - stiffness: 1 - energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 - substeps: 4 - solverIterations: 2 - collisions: - enabled: 1 - influenceRigidbodies: 1 - stride: 1 - friction: 0.1 - collisionMargin: 0.025 - ignoreLayers: - serializedVersion: 2 - m_Bits: 4 ---- !u!4 &309743963 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 309743959} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1.2, z: 3} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &529522211 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 529522215} - - component: {fileID: 529522214} - - component: {fileID: 529522213} - - component: {fileID: 529522212} - m_Layer: 0 - m_Name: Rope-Right - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &529522212 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529522211} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 1 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 791475874} - localConnectionPoint: - x: 0 - y: 0.3 - z: 0 ---- !u!114 &529522213 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529522211} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 0 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 289142603} - localConnectionPoint: - x: 0 - y: 0.3 - z: 0 ---- !u!114 &529522214 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529522211} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325b217b839086b4ca705834516bc0d5, type: 3} - m_Name: - m_EditorClassIdentifier: - radius: 0.05 - radialVertices: 6 - isLoop: 0 - material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - shadowMode: 1 - customMesh: - mesh: {fileID: 0} - rotation: 90 - scale: {x: 1, y: 1, z: 1} - stretch: 0 - spawnPoints: - - x: 0 - y: 0 - z: -3 - - x: 0 - y: 0 - z: 3 - interpolation: 0 - simulation: - enabled: 1 - resolution: 5 - massPerMeter: 3 - stiffness: 1 - energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 - substeps: 4 - solverIterations: 2 - collisions: - enabled: 1 - influenceRigidbodies: 1 - stride: 1 - friction: 0.1 - collisionMargin: 0.025 - ignoreLayers: - serializedVersion: 2 - m_Bits: 4 ---- !u!4 &529522215 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529522211} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: 1.2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &664962322 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 664962326} - - component: {fileID: 664962325} - - component: {fileID: 664962324} - - component: {fileID: 664962323} - m_Layer: 0 - m_Name: Rope-Left (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &664962323 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 664962322} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 1 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 1139874703} - localConnectionPoint: - x: 0 - y: 0 - z: 0 ---- !u!114 &664962324 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 664962322} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 0 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 209634130} - localConnectionPoint: - x: 0 - y: 0 - z: 0 ---- !u!114 &664962325 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 664962322} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325b217b839086b4ca705834516bc0d5, type: 3} - m_Name: - m_EditorClassIdentifier: - radius: 0.05 - radialVertices: 6 - isLoop: 0 - material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - shadowMode: 1 - customMesh: - mesh: {fileID: 0} - rotation: 90 - scale: {x: 1, y: 1, z: 1} - stretch: 0 - spawnPoints: - - x: 0 - y: 0 - z: -3 - - x: 0 - y: 0 - z: 3 - interpolation: 0 - simulation: - enabled: 1 - resolution: 5 - massPerMeter: 3 - stiffness: 1 - energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 - substeps: 4 - solverIterations: 2 - collisions: - enabled: 1 - influenceRigidbodies: 1 - stride: 1 - friction: 0.1 - collisionMargin: 0.025 - ignoreLayers: - serializedVersion: 2 - m_Bits: 4 ---- !u!4 &664962326 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 664962322} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -3, y: 0.8, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &741172264 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 741172268} - - component: {fileID: 741172267} - - component: {fileID: 741172266} - - component: {fileID: 741172265} - m_Layer: 0 - m_Name: Rope-Left - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &741172265 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 741172264} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 1 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 1139874703} - localConnectionPoint: - x: 0 - y: 0.3 - z: 0 ---- !u!114 &741172266 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 741172264} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 0 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 209634130} - localConnectionPoint: - x: 0 - y: 0.3 - z: 0 ---- !u!114 &741172267 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 741172264} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325b217b839086b4ca705834516bc0d5, type: 3} - m_Name: - m_EditorClassIdentifier: - radius: 0.05 - radialVertices: 6 - isLoop: 0 - material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - shadowMode: 1 - customMesh: - mesh: {fileID: 0} - rotation: 90 - scale: {x: 1, y: 1, z: 1} - stretch: 0 - spawnPoints: - - x: 0 - y: 0 - z: -3 - - x: 0 - y: 0 - z: 3 - interpolation: 0 - simulation: - enabled: 1 - resolution: 5 - massPerMeter: 3 - stiffness: 1 - energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 - substeps: 4 - solverIterations: 2 - collisions: - enabled: 1 - influenceRigidbodies: 1 - stride: 1 - friction: 0.1 - collisionMargin: 0.025 - ignoreLayers: - serializedVersion: 2 - m_Bits: 4 ---- !u!4 &741172268 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 741172264} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -3, y: 1.2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &791475870 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 791475874} - - component: {fileID: 791475873} - - component: {fileID: 791475872} - - component: {fileID: 791475871} - m_Layer: 2 - m_Name: Corner-Top-Right - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &791475871 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 791475870} - 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 &791475872 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 791475870} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &791475873 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 791475870} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &791475874 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 791475870} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: 0.75, z: 3} - m_LocalScale: {x: 0.3, y: 1.5, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &794908071 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 794908075} - - component: {fileID: 794908074} - - component: {fileID: 794908073} - - component: {fileID: 794908072} - - component: {fileID: 794908076} - m_Layer: 0 - m_Name: Ball - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &794908072 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 794908071} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &794908073 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 794908071} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 05dfe89e2a8b04019aa2fd84b55f8c8e, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &794908074 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 794908071} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &794908075 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 794908071} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!54 &794908076 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 794908071} - serializedVersion: 5 - m_Mass: 1 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!1 &823804522 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 823804525} - - component: {fileID: 823804524} - - component: {fileID: 823804523} - - component: {fileID: 823804526} - m_Layer: 0 - m_Name: Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &823804523 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 823804522} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d741c2b5cb0190448822896128d51f8a, type: 3} - m_Name: - m_EditorClassIdentifier: - pickedMesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} - targetMesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} - pickedMaterial: {fileID: 2100000, guid: d35e58ef8c9e0e1429517c447ba73497, type: 2} - targetMaterial: {fileID: 2100000, guid: f1f2a238089ca461f9383525476c3a2b, type: 2} - maxPickDistance: 2 - maxImpulseStrength: 3 - leverage: 10 - splitPickedRopeOnKey: 32 - ropes: - - {fileID: 309743962} - - {fileID: 529522214} - - {fileID: 664962325} - - {fileID: 741172267} - - {fileID: 825604886} - - {fileID: 1543641999} - - {fileID: 1570570781} - - {fileID: 1792550976} ---- !u!20 &823804524 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 823804522} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &823804525 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 823804522} - serializedVersion: 2 - m_LocalRotation: {x: 0.2588191, y: 0, z: 0, w: 0.9659258} - m_LocalPosition: {x: 0, y: 5, z: -7} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 30, y: 0, z: 0} ---- !u!114 &823804526 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 823804522} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0383ecb7d718b4bd682ab0d0f68bce82, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &825604885 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 825604887} - - component: {fileID: 825604886} - - component: {fileID: 825604889} - - component: {fileID: 825604888} - m_Layer: 0 - m_Name: Rope-Bottom - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &825604886 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 825604885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325b217b839086b4ca705834516bc0d5, type: 3} - m_Name: - m_EditorClassIdentifier: - radius: 0.05 - radialVertices: 6 - isLoop: 0 - material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - shadowMode: 1 - customMesh: - mesh: {fileID: 0} - rotation: 90 - scale: {x: 1, y: 1, z: 1} - stretch: 0 - spawnPoints: - - x: -3 - y: 0 - z: 0 - - x: 3 - y: 0 - z: 0 - interpolation: 0 - simulation: - enabled: 1 - resolution: 5 - massPerMeter: 3 - stiffness: 1 - energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 - substeps: 4 - solverIterations: 2 - collisions: - enabled: 1 - influenceRigidbodies: 1 - stride: 1 - friction: 0.1 - collisionMargin: 0.025 - ignoreLayers: - serializedVersion: 2 - m_Bits: 4 ---- !u!4 &825604887 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 825604885} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1.2, z: -3} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &825604888 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 825604885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 1 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 289142603} - localConnectionPoint: - x: 0 - y: 0.3 - z: 0 ---- !u!114 &825604889 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 825604885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 0 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 209634130} - localConnectionPoint: - x: 0 - y: 0.3 - z: 0 ---- !u!1 &1139874699 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1139874703} - - component: {fileID: 1139874702} - - component: {fileID: 1139874701} - - component: {fileID: 1139874700} - m_Layer: 2 - m_Name: Corner-Top-Left - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1139874700 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1139874699} - 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 &1139874701 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1139874699} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1139874702 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1139874699} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1139874703 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1139874699} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -3, y: 0.75, z: 3} - m_LocalScale: {x: 0.3, y: 1.5, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1543641996 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1543642000} - - component: {fileID: 1543641999} - - component: {fileID: 1543641998} - - component: {fileID: 1543641997} - m_Layer: 0 - m_Name: Rope-Right (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1543641997 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1543641996} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 1 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 791475874} - localConnectionPoint: - x: 0 - y: 0 - z: 0 ---- !u!114 &1543641998 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1543641996} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 0 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 289142603} - localConnectionPoint: - x: 0 - y: 0 - z: 0 ---- !u!114 &1543641999 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1543641996} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325b217b839086b4ca705834516bc0d5, type: 3} - m_Name: - m_EditorClassIdentifier: - radius: 0.05 - radialVertices: 6 - isLoop: 0 - material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - shadowMode: 1 - customMesh: - mesh: {fileID: 0} - rotation: 90 - scale: {x: 1, y: 1, z: 1} - stretch: 0 - spawnPoints: - - x: 0 - y: 0 - z: -3 - - x: 0 - y: 0 - z: 3 - interpolation: 0 - simulation: - enabled: 1 - resolution: 5 - massPerMeter: 3 - stiffness: 1 - energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 - substeps: 4 - solverIterations: 2 - collisions: - enabled: 1 - influenceRigidbodies: 1 - stride: 1 - friction: 0.1 - collisionMargin: 0.025 - ignoreLayers: - serializedVersion: 2 - m_Bits: 4 ---- !u!4 &1543642000 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1543641996} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: 0.8, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1570570778 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1570570782} - - component: {fileID: 1570570781} - - component: {fileID: 1570570780} - - component: {fileID: 1570570779} - m_Layer: 0 - m_Name: Rope-Top (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1570570779 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1570570778} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 1 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 791475874} - localConnectionPoint: - x: 0 - y: 0 - z: 0 ---- !u!114 &1570570780 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1570570778} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 0 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 1139874703} - localConnectionPoint: - x: 0 - y: 0 - z: 0 ---- !u!114 &1570570781 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1570570778} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325b217b839086b4ca705834516bc0d5, type: 3} - m_Name: - m_EditorClassIdentifier: - radius: 0.05 - radialVertices: 6 - isLoop: 0 - material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - shadowMode: 1 - customMesh: - mesh: {fileID: 0} - rotation: 90 - scale: {x: 1, y: 1, z: 1} - stretch: 0 - spawnPoints: - - x: -3 - y: 0 - z: 0 - - x: 3 - y: 0 - z: 0 - interpolation: 0 - simulation: - enabled: 1 - resolution: 5 - massPerMeter: 3 - stiffness: 1 - energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 - substeps: 4 - solverIterations: 2 - collisions: - enabled: 1 - influenceRigidbodies: 1 - stride: 1 - friction: 0.1 - collisionMargin: 0.025 - ignoreLayers: - serializedVersion: 2 - m_Bits: 4 ---- !u!4 &1570570782 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1570570778} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.8, z: 3} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1579321095 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1579321097} - - component: {fileID: 1579321096} - - component: {fileID: 1579321098} - m_Layer: 0 - m_Name: Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1579321096 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1579321095} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - 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: 4 - 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_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &1579321097 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1579321095} - 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: 0} - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!114 &1579321098 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1579321095} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalLightData - m_UsePipelineSettings: 1 - m_AdditionalLightsShadowResolutionTier: 2 - m_CustomShadowLayers: 0 - m_LightCookieSize: {x: 1, y: 1} - m_LightCookieOffset: {x: 0, y: 0} - m_SoftShadowQuality: 0 - m_RenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_ShadowRenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_Version: 4 - m_LightLayerMask: 1 - m_ShadowLayerMask: 1 - m_RenderingLayers: 1 - m_ShadowRenderingLayers: 1 ---- !u!850595691 &1579945706 -LightingSettings: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 1 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 2 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 1 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 ---- !u!1 &1792550973 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1792550977} - - component: {fileID: 1792550976} - - component: {fileID: 1792550975} - - component: {fileID: 1792550974} - m_Layer: 0 - m_Name: Rope-Bottom (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1792550974 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1792550973} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 1 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 289142603} - localConnectionPoint: - x: 0 - y: 0 - z: 0 ---- !u!114 &1792550975 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1792550973} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3c7388c73173748148c4ba5f2ad6c713, type: 3} - m_Name: - m_EditorClassIdentifier: - type: 0 - ropeLocation: 0 - autoFindRopeLocation: 0 - rigidbodySettings: - body: {fileID: 0} - stiffness: 0.1 - damping: 0.1 - transformSettings: - transform: {fileID: 209634130} - localConnectionPoint: - x: 0 - y: 0 - z: 0 ---- !u!114 &1792550976 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1792550973} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325b217b839086b4ca705834516bc0d5, type: 3} - m_Name: - m_EditorClassIdentifier: - radius: 0.05 - radialVertices: 6 - isLoop: 0 - material: {fileID: 2100000, guid: 189732c736fdb544f98524f96c34aff6, type: 2} - shadowMode: 1 - customMesh: - mesh: {fileID: 0} - rotation: 90 - scale: {x: 1, y: 1, z: 1} - stretch: 0 - spawnPoints: - - x: -3 - y: 0 - z: 0 - - x: 3 - y: 0 - z: 0 - interpolation: 0 - simulation: - enabled: 1 - resolution: 5 - massPerMeter: 3 - stiffness: 1 - energyLoss: 0.005 - lengthMultiplier: 1 - gravityMultiplier: 1 - useCustomGravity: 0 - customGravity: - x: 0 - y: -9.81 - z: 0 - substeps: 4 - solverIterations: 2 - collisions: - enabled: 1 - influenceRigidbodies: 1 - stride: 1 - friction: 0.1 - collisionMargin: 0.025 - ignoreLayers: - serializedVersion: 2 - m_Bits: 4 ---- !u!4 &1792550977 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1792550973} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.8, z: -3} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 823804525} - - {fileID: 1579321097} - - {fileID: 70725251} - - {fileID: 209634130} - - {fileID: 289142603} - - {fileID: 791475874} - - {fileID: 1139874703} - - {fileID: 825604887} - - {fileID: 309743963} - - {fileID: 741172268} - - {fileID: 529522215} - - {fileID: 1792550977} - - {fileID: 1570570782} - - {fileID: 664962326} - - {fileID: 1543642000} - - {fileID: 124944110} - - {fileID: 794908075} diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing.unity.meta b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing.unity.meta deleted file mode 100644 index 0724a8157..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 235f1ac58214e4e8aa0911cc8cab844e -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing/LightingData.asset b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing/LightingData.asset deleted file mode 100644 index d0ac5331c..000000000 Binary files a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing/LightingData.asset and /dev/null differ diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing/LightingData.asset.meta b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing/LightingData.asset.meta deleted file mode 100644 index 8d088e5ad..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/BoxingRing/LightingData.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fb17f1c0387cfc242b64938cee6c6079 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 112000000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ground.mat b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ground.mat deleted file mode 100644 index 5bd522b67..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ground.mat +++ /dev/null @@ -1,139 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-8110553798369416356 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion - version: 10 ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Ground - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AddPrecomputedVelocity: 0 - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 1 - - _Glossiness: 1 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 1 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 0.2002492, g: 0.29765657, b: 0.5660378, a: 1} - - _Color: {r: 0.20024917, g: 0.29765654, b: 0.5660378, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] - m_AllowLocking: 1 diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ground.mat.meta b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ground.mat.meta deleted file mode 100644 index aceced76a..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Ground.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1ed915716adf4441cbc55196b3610a75 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Spawner.cs b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Spawner.cs deleted file mode 100644 index dbd74d2f2..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Spawner.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Spawner : MonoBehaviour -{ - public Transform prefab; - public float randomRange = 0.5f; - public float timeToSpawn = 4.0f; - - private float timer; - - public void Update() - { - timer += Time.deltaTime; - - if (timer >= timeToSpawn) - { - timer = 0.0f; - - var obj = Instantiate(prefab, transform.position + Random.insideUnitSphere * randomRange, transform.rotation); - obj.gameObject.SetActive(true); - } - } - - public void OnDrawGizmos() - { - Gizmos.color = Color.yellow; - Gizmos.DrawWireSphere(transform.position, randomRange); - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Spawner.cs.meta b/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Spawner.cs.meta deleted file mode 100644 index aa855c942..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Examples/02_BoxingRing/Spawner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d7f10005d854a49a4b3371d4701441fd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Helpers.meta b/Assets/Scripts/ThirdParty/Rope/Helpers.meta deleted file mode 100644 index f7acb66ed..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Helpers.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 56f8fa0293ae146a0a38a90388439416 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Helpers/Editor.meta b/Assets/Scripts/ThirdParty/Rope/Helpers/Editor.meta deleted file mode 100644 index f04ade931..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Helpers/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b31243ee8abab458088c6fccccfb5c58 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Helpers/Editor/SimpleRopeInteractionEditor.cs b/Assets/Scripts/ThirdParty/Rope/Helpers/Editor/SimpleRopeInteractionEditor.cs deleted file mode 100644 index 187e376fd..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Helpers/Editor/SimpleRopeInteractionEditor.cs +++ /dev/null @@ -1,21 +0,0 @@ -using UnityEngine; -using UnityEditor; -using UnityEditor.SceneManagement; -using System.Linq; - -namespace NBF -{ - [CustomEditor(typeof(SimpleRopeInteraction))] - public class SimpleRopeInteractionEditor : Editor - { - public override void OnInspectorGUI() - { - DrawDefaultInspector(); - - if (GUILayout.Button("Find ropes in current scene")) - { - ((SimpleRopeInteraction)target).ropes = StageUtility.GetMainStageHandle().FindComponentsOfType().ToList(); - } - } - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Helpers/Editor/SimpleRopeInteractionEditor.cs.meta b/Assets/Scripts/ThirdParty/Rope/Helpers/Editor/SimpleRopeInteractionEditor.cs.meta deleted file mode 100644 index b47616bc1..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Helpers/Editor/SimpleRopeInteractionEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 690ba92ccc18546d09d046bf31fa4887 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteraction.cs b/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteraction.cs deleted file mode 100644 index 09e493d05..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteraction.cs +++ /dev/null @@ -1,171 +0,0 @@ -using UnityEngine; -using Unity.Mathematics; -using System.Collections.Generic; - -namespace NBF -{ - public class SimpleRopeInteraction : MonoBehaviour - { - [Tooltip("The mesh to show on the picked particle position. May be empty.")] - public Mesh pickedMesh; - - [Tooltip("The mesh to show on the target position. May be empty.")] - public Mesh targetMesh; - - [Tooltip("The material to use for the picked mesh")] - public Material pickedMaterial; - - [Tooltip("The material to use for the target mesh")] - public Material targetMaterial; - - [Tooltip("The maximum distance a rope can be picked from")] - public float maxPickDistance = 2.0f; - - [Tooltip("The max allowable impulse strength to use. If zero, no limit is applied.")] - public float maxImpulseStrength = 3.0f; - - [Tooltip("The mass multiplier to apply to the pulled rope particle. Increasing the mass multiplier for a particle increases its influence on neighboring particles. As this script pulls a single particle at a time only, it is beneficial to set the mass multiplier above 1 to improve the stability of the overall rope simulation.")] - public float leverage = 10.0f; - - [Tooltip("The keyboard key to use to split a picked rope. May be set to None to disable this feature.")] - public KeyCode splitPickedRopeOnKey = KeyCode.Space; - - [Tooltip("The list of ropes that may be picked")] - public List ropes; - - protected bool ready; - protected Rope rope; - protected int particle; - protected float distance; - protected float3 pickedPosition; - protected float3 targetPosition; - - public void SplitPickedRope() - { - if (rope == null) - { - return; - } - - ropes.Remove(rope); - - var newRopes = new Rope[2]; - // rope.SplitAt(particle, newRopes); - if (newRopes[0] != null) ropes.Add(newRopes[0]); - if (newRopes[1] != null) ropes.Add(newRopes[1]); - - rope = null; - } - - protected Rope GetClosestRope(Ray ray, out int closestParticleIndex, out float closestDistanceAlongRay) - { - closestParticleIndex = -1; - closestDistanceAlongRay = 0.0f; - - var closestRopeIndex = -1; - var closestDistance = 0.0f; - for (int i = 0; i < ropes.Count; i++) - { - ropes[i].GetClosestParticle(ray, out int particleIndex, out float distance, out float distanceAlongRay); - - if (distance > maxPickDistance) - { - continue; - } - - if (closestRopeIndex != -1 && distance > closestDistance) - { - continue; - } - - closestRopeIndex = i; - closestParticleIndex = particleIndex; - closestDistance = distance; - closestDistanceAlongRay = distanceAlongRay; - } - - return closestRopeIndex != -1 ? ropes[closestRopeIndex] : null; - } - - public void FixedUpdate() - { - var ray = Camera.main.ScreenPointToRay(Input.mousePosition); - - if (Input.GetMouseButton(0)) - { - // Mouse down - if (ready && rope == null) - { - // Not pulling a rope, find the closest one to the mouse - var closestRope = GetClosestRope(ray, out int closestParticleIndex, out float closestDistanceAlongRay); - - if (closestRope != null && closestParticleIndex != -1 && closestRope.GetMassMultiplierAt(closestParticleIndex) > 0.0f) - { - // Found a rope and particle on the rope, start pulling that particle! - rope = closestRope; - particle = closestParticleIndex; - distance = closestDistanceAlongRay; - - ready = false; - } - } - } - else - { - // Mouse up - if (rope != null) - { - // Stop pulling the rope - rope.SetMassMultiplierAt(particle, 1.0f); - rope = null; - } - } - - if (rope != null) - { - // We are pulling the rope - - // Move the rope particle to the mouse position on the grab-plane - pickedPosition = rope.GetPositionAt(particle); - targetPosition = ray.GetPoint(distance); - - if (maxImpulseStrength == 0.0f) - { - rope.SetMassMultiplierAt(particle, 0.0f); - } - else - { - rope.SetMassMultiplierAt(particle, leverage); - } - - rope.SetPositionAt(particle, targetPosition, maxImpulseStrength); - - // Split the rope on key if keybind is set - if (Input.GetKey(splitPickedRopeOnKey)) - { - SplitPickedRope(); - } - } - } - - public void Update() - { - if (!Input.GetMouseButton(0)) - { - ready = true; - } - - if (rope != null) - { - if (pickedMesh != null && pickedMaterial != null) - { - Graphics.DrawMesh(pickedMesh, Matrix4x4.TRS(pickedPosition, Quaternion.identity, Vector3.one * 0.25f), pickedMaterial, 0); - } - if (targetMesh != null && targetMaterial != null) - { - Graphics.DrawMesh(targetMesh, Matrix4x4.TRS(targetPosition, Quaternion.identity, Vector3.one * 0.25f), targetMaterial, 0); - } - } - } - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteraction.cs.meta b/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteraction.cs.meta deleted file mode 100644 index 3ea93cff8..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteraction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d741c2b5cb0190448822896128d51f8a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteractionGUI.cs b/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteractionGUI.cs deleted file mode 100644 index 82e42b88c..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteractionGUI.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace NBF.Example -{ - [RequireComponent(typeof(SimpleRopeInteraction))] - public class SimpleRopeInteractionGUI : MonoBehaviour - { - protected float desiredMaxImpulseStrength; - - protected Rect guiRect = new Rect(10, 10, 200, 0); - - public void Start() - { - desiredMaxImpulseStrength = GetComponent().maxImpulseStrength; - } - - public void Window(int id) - { - var interact = GetComponent(); - - bool isLimiting = interact.maxImpulseStrength > 0.0f; - bool shouldLimit = GUILayout.Toggle(isLimiting, "Limit max impulse strength"); - - if (isLimiting != shouldLimit) - { - Event.current.Use(); - - if (shouldLimit) - { - interact.maxImpulseStrength = desiredMaxImpulseStrength; - } - else - { - desiredMaxImpulseStrength = interact.maxImpulseStrength; - - interact.maxImpulseStrength = 0.0f; - } - } - - var limitString = shouldLimit ? interact.maxImpulseStrength.ToString("0.0") + " Ns" : "Infinite"; - GUILayout.Label("Max impulse strength: " + limitString); - - interact.maxImpulseStrength = GUILayout.HorizontalSlider(interact.maxImpulseStrength, 0.0f, 10.0f); - - GUI.enabled = false; - GUILayout.Label("Instructions: Use the left mouse button to interact with the ropes in the scene. While holding on to a rope using the mouse, press on the keyboard to cut it at the held position."); - GUI.enabled = true; - } - - public void OnGUI() - { - guiRect = GUILayout.Window(0, guiRect, Window, "Interaction settings"); - } - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteractionGUI.cs.meta b/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteractionGUI.cs.meta deleted file mode 100644 index e9122396e..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Helpers/SimpleRopeInteractionGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0383ecb7d718b4bd682ab0d0f68bce82 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/README-HTML.md.html b/Assets/Scripts/ThirdParty/Rope/README-HTML.md.html deleted file mode 100644 index 0f19bbfb5..000000000 --- a/Assets/Scripts/ThirdParty/Rope/README-HTML.md.html +++ /dev/null @@ -1,327 +0,0 @@ - - -**Rope Toolkit** - version 2.2.3 - -The Rope Toolkit brings *stable* and *fast* rope physics to your project. The rope component can be used to simulate simple wires or more advanced setups with pulleys and weights that require active collision detection. The bundled example scenes show how to connect the rope up to simulate cranes, rope bridges, swings and a boxing ring. - -The rope component is written with performance in mind and many compute intensive tasks are handled by [Unity jobs on separate threads accelerated using the Burst compiler](https://unity.com/dots). As a result, the toolkit has excellent performance on mobile devices. - -Overview -======== - -(##) Features - -* Stable & fast rope physics -* Mobile friendly! -* Many tweakable user parameters -* Ability to dynamically split ropes using the SplitAt() method -* 4 different rope connection types allow interaction with the rest of the scene - - Pin Rope To Transform - - Pin Transform To Rope - - Pull Rigidbody To Rope - - Two Way Coupling Between Rigidbody And Rope -* Scene view handles for adjusting rope spawn curve -* High performance is achieved using Unity jobs and the Burst compiler - - Typical performance for the example scene with collisions enabled: - - ~0.2 ms spent in job threads - - ~0.7 ms spent on the main thread - - Typical performance for the example scene with collisions disabled: - - ~0.15 ms spent in job threads - - ~0.35 ms spent on the main thread -* Full source code -* Example scenes - - Main - - Shows how ropes and rigidbodies can be connected together in a typical scene - - Use the mouse to interact with the rope and the Space key to split ropes being interacted with - - DynamicAttach - - Shows how to attach and detach ropes using the scripts - - BoxingRing - - Shows how ropes and rigidbodies can influence each other through collisions - -(##) Current Limitations - -* Collision support for convex Mesh, Box, Sphere and Capsule colliders only -* Scripting knowledge required for advanced rope interactions - -Requirements -============ - -* Burst 1.1.2 or above - -Components -========== - -(##) Rope - -This is the main component that simulates and renders the rope - -(##) RopeConnection - -This component connects the rope it is attached to to a transform or rigidbody component in the scene. The resulting behaviour depends on what type of connection is used: - -Pin Rope To Transform -: Pins a point on the rope to a point on a transform. The transform can move freely and the rope will always follow along. -Pin Transform To Rope -: Pins a point on a transform to a point on the rope. The rope will move freely and the transform will always follow along. This connection takes control of the transform. -Pull Rigidbody To Rope -: Pulls a point on a rigidbody towards a point on the rope by applying velocity changes to the rigidbody. This connection does not take control of the rigidbody, other forces and constraints are respected. -Two Way Coupling Between Rigidbody And Rope -: Introduces a two-way coupling between the rope and a rigidbody. The rope will react to the rigidbody and feedback impulses back to the rigidbody allowing for complicated setups such as the crane in the example scene. Care must be taken so that the rope `mass per meter` value is comparable to the masses of connected rigidbodies, otherwise the simulation may blow up. This connection does not take control of the rigidbody, other forces and constraints are respected. - -Instructions -============ - -(##) First time use in a new project - -The **Rope Toolkit requires the Burst package (by Unity) to function properly**. Make sure to import it using the Package Manager before importing the Rope Toolkit into your project. Follow these steps to import the Burst package: - -1. Choose `Window -> Package Manager` from the menu bar -2. In the window that appears, select `Unity Registry` from the drop-down menu next to the `+` sign -3. In the list to the left, select the `Burst` package and press `Install` in the lower right corner -4. The Rope Toolkit can be found in the `My Assets` drop-down menu of the Package Manager (instead of `Unity Registry` in step 2). Import it in the same way as the Burst package. - -(##) Workflow - -1. Create an empty game object -2. Attach the Rope script to it -3. Add a few spawn points either using the scene view buttons (`Push spawn point`, `Pop spawn point`) or by manually changing the `Spawn Points` property in the inspector -4. Move around the spawn points using the scene view handles - - Hold down left `Shift` to switch to the ordinary transform tool for more fine-grained control -5. Assign a material to the `Material` property of the rope - - Optionally adjust the `Tiling` of the material - - 1 scene unit is mapped to 1 texture tile (x-axis) lengt-wise - - 1 texture tile (y-axis) wraps around the rope curlwise -6. Optionally attach any number of `RopeConnection` components to the rope - - Set the `Body` or `Transform` reference to the object the rope should be connected to - - Set the `Local Connection Point` to be the point in object local space to which the rope should be attached - -(##) General tips - -* Examine the example scenes to get an understanding for how to connect the rope in a typical scene -* Change the tweakable parameters when in play-mode to get a feel for what they do -* There are tooltips for all tweakable parameters -* Look at the helper scripts to get an understanding for how one can interact with the rope using custom scripts - -(##) Performance tips - -* Avoid enabling collisions unless absolutely necessary -* Disable simulation of ropes that are far away or out of view using a custom script (they will still be rendered) -* Only call rope methods in a custom script from `FixedUpdate()` or `LateUpdate()` - -(##) Collisions - -Collision detection is very performance intensive, as all physics queries have to be performed on the main thread. Aim to keep the `Stride` value as high as possible to reduce the amount of queries. Another approach is to disable simulation of ropes that require collisions more aggressively and keep the number of active ropes with collisions enabled to a bare minimum, even though the total number in the scene is high. - -(##) Stiffness - -Rope stiffness depends on many factors: the `Stiffness` value of the rope, the `Resolution` of the rope, the `Substeps` and `Solver Iterations` of the rope and finally the `Fixed Timestep` value in `Project Settings` -> `Time`. To achieve a stiff rope, choose a high stiffness value, a low resolution value, many substeps and solver iterations and a low fixed time step. - -Scripting interface -=================== - -The rope is simuated using a set of inter-connected particles (visuaized by spheres when selecting a rope in edit-mode). Since the physics simulation is inherently stable, one can move around these particles in almost any way imaginable. This enables many custom setups such as the rope bridge in the example scene (see `RopeBridgePlank.cs`). - -(##) Interface - -To fascilitate custom interactions with ropes, the rope component exposes a small scripting interface. The table below shows the properties and methods available. For more information on a particular property or method, see the description in the source file. - -`measurements` -: Returns the measurements of the rope. The measurements remain constant after the rope is first initialized. - -`currentBounds` -: The current world-space bounds of the visual mesh - -`PushSpawnPoint()` -: Adds a new spawn point to the rope. May be called from edit-mode. - -`PopSpawnPoint()` -: Removes the last spawn point of the rope. May be called from edit-mode. - -`GetParticleIndexAt(distance)` -: Returns the index of the simulation particle at a particular distance along the curve of the rope - -`GetScalarDistanceAt(particleIndex)` -: Returns the scalar distance along the curve of the rope that a particular simulation particle is located at. The scalar distance is a value between 0 and 1. The lengthMultiplier is not taken into account. To get the distance along the rope in world space, multiply the scalar distance by the realCurveLength measurement. - -`GetPositionAt(particleIndex)` -: Returns the current position of a particular simulation particle - - -`SetPositionAt(particleIndex, position)` -: Sets the position of a particular simulation particle - -`SetPositionAt(particleIndex, position, maxImpulseStrength)` -: Sets the position of a particular simulation particle while at the same time making sure not to apply a larger impulse than the specified max impulse strength. If the max impulse strength is exceeded, the particle will be moved part-way towards the target position. This method is useful when limiting the strength of helper scripts that interact with the rope. - -`GetVelocityAt(particleIndex)` -: Returns the current velocity of a particular simulation particle - -`SetVelocityAt(particleIndex, velocity)` -: Sets the velocity of a particular simulation particle - -`GetMassMultiplierAt(particleIndex)` -: Returns the mass multiplier of a particular simulation particle. This value can be used to increase or decrease a particle's influence on neighboring particles. A value of 0 will make the particle immovable. A value of 2 will make the particle twice as heavy as its neighbors. The default value is 1. - -`SetMassMultiplierAt(particleIndex, value)` -: Sets the mass multiplier of a particular simulation particle. This value can be used to increase or decrease a particle's influence on neighboring particles. A value of 0 will make the particle immovable. A value of 2 will make the particle twice as heavy as its neighbors. The default value is 1. - -`GetClosestParticle(point, out particleIndex, out distance)` -: Finds the simulation particle closest to a particular point - - -`GetClosestParticle(ray, out particleIndex, out distance, out distanceAlongRay)` -: Finds the simulation particle closest to a particular ray - -`RegisterRigidbodyConnection(particleIndex, rigidbody, rigidbodyDamping, pointOnBody, stiffness)` -: Registers a rigidbody connection for the next simulation frame. A rigidbody connection is a two-way coupling of a simulation particle to a traditional rigidbody. Make sure to call this method from FixedUpdate(). Any simulation particle involved in a rigidbody connection will get its mass multiplier reset to 1 at the end of the simulation frame. - -`ResetToSpawnCurve()` -: Resets the rope to its original shape relative to the current transform. Useful when activating a pooled game object that is deactivated and re-activated instead of destroyed and instantiated. - -`GetCurrentLength()` -: Computes the current length of the rope. In contrast to the measurements.realCurveLength field, this value includes the stretching of the rope due to stress. - -`SplitAt(particleIndex, outNewRopes)` -: Splits the rope at a specific simulation particle and returns the rope components of the newly instantiated game objects. Make sure that the supplied array has exactly 2 slots. A Unity message 'OnRopeSplit(Rope.OnSplitParams)' will be sent to each newly created rope. - -(##) Execution order - -Make sure the custom script runs before the custom execution order of `Rope.cs`, which defaults to 100. Calling rope methods from `Update()` or after the rope's `FixedUpdate()` will halt the main thread as it waits for the rope simulation jobs to complete. This destroys parallelism and performance. - -(##) Example usage - -```c# -using RopeToolkit; - -public class RopeMover : MonoBehaviour -{ - public Rope rope; - - public void FixedUpdate() - { - if (rope == null) - { - return; - } - rope.SetMassMultiplierAt(0, 0.0f); // makes particle 0 immovable with respect to the simulation - rope.SetPositionAt(0, transform.position); - } -} -``` - - -FAQ -=== - -Q: Why does a rigidbody with [a freeze rotation constraint](https://docs.unity3d.com/ScriptReference/Rigidbody-constraints.html) act strange when it is connected to a rope? -: A: This is caused by [a bug in Unity](https://fogbugz.unity3d.com/default.asp?1342781_6lnk429ujeergaf6). - -Change log -========== - -(##) v2.2.3 - -* Introduce a "max impulse strength" parameter to SetPositionAt() enabling an easy way to limit the pull strength of helper scripts (such as in the RopeMouseInteraction script) - -(##) v2.2.2 - -* Fix bug where rope length was not preserved accurately when splitting the rope using SplitAt() - -(##) v2.2.1 - -* Use game object layer for rendering -* Add shadow casting mode -* Add setting for using a custom gravity value or the global physics gravity - - **[ACTION REQUIRED]** Update any rope component that has the simulation.gravity property set to use the new simulation.useCustomGravity and simulation.customGravity properties instead -* Move custom mesh settings into their own category - - **[ACTION REQUIRED]** Update any rope component that uses a custom mesh to use the new customMesh category instead -* Add custom mesh scale override -* Add ability to stretch custom meshes instead of them moving too far apart when the rope is stretched - -(##) v2.2.0 - -* Rename package from "Rope Minikit" to "Rope Toolkit" to reflect its fully featured state - - **[ACTION REQURED]** Any custom scripts must now reference the namespace `RopeToolkit` -* Add support for simulation substeps to enable stiffer ropes - - **[ACTION REQURED]** To not have to retweak rope properties in an existing project, set the simulation substeps property (found under `Rope/Simulation/Advanced`) to `1` after importing the new version of the toolkit -* Add ability for ropes to influence rigidbodies when collisions are enabled - - See the `Rope/Collisions/Influence Rigidbodies` property -* Add BoxingRing example scene to show how ropes can now push rigidbodies away -* Remove ability to move one end of a rope by updating its Transform component - use the RopeConnection component instead - - This introduced subtle bugs in certain situations -* Reorganize rope inspector view slightly - -(##) v2.1.0 - -* Add interpolation property that may be used to smooth the motion of the rope - - This is especially useful when a low fixed update rate is used - - The behavior mimics the [RigidbodyInterpolation](https://docs.unity3d.com/ScriptReference/RigidbodyInterpolation.html) setting and has the following values - - None - - Interpolate - - Extrapolate -* Improve performance when generating rope geometry (by taking advantage of newer Unity APIs) - -(##) v2.0.0 - -* Replace the RopePin and RopeRigidbodyConnection components with a single RopeConnection component and add 2 new connection types - - There are now 4 connection types: - - Pin Rope To Transform - - Pin Transform To Rope - - Pull Rigidbody To Rope - - Two Way Coupling Between Rigidbody And Rope - - Warning: This change breaks backwards compatibility! -* Add gravity property for setting the gravity vector on a per-rope basis -* Fix bug where wrong impulse function was used for rigidbody feedback - - Warning: This might require re-tweaking of the stiffness/damping values of your existing rope setups -* Fix bug where rigidbody rotational constraints would not be handled properly when connected to a rope -* Reskin example scene -* Switch to 3 digit semantic versioning - -(##) v1.11 - -* More accurate rope length calculation on SplitAt() -* Fix bug where multiple ropes with custom meshes would allocate unnecessary memory - -(##) v1.1 - -* Add support for dynamically splitting the rope using the new SplitAt() method - - Try it out in the example scene by grabbing a rope with the mouse pointer and pressing space before letting go! -* Add support for custom meshes that can be rendered instead of the default rope cylinder - - To illustrate this, the crane in the example scene now has a chain with links instead of a smooth rope -* Change RopePin and RopeRigidbodyConnection components to be lazily initialized -* Rename RopeMeasurements struct to Measurements and make it a sub-type of Rope -* Fix bug where toggling the simulation.enabled flag could result in an IndexOutOfBounds exception - -(##) v1.03 - -* Fix bug where one end of the rope could be moved if it collided with something even though it was pinned down using a RopePin component -* Fix bug where one end of the rope would show more sag than the other end when the rope was being stretched -* Add Rope.GetCurrentLength() method -* The example scene rope material now uses an explicit texture as the built-in one previously used caused iOS builds to fail - -(##) v1.02 - -* Add soft backdrop to example scene - -(##) v1.01 - -* Fix rope enable/disable logic -* Add ResetToSpawnCurve() method - -(##) v1.0 - -* Initial release - -Contact -======= - -Please let me know if you run into any problems when using the toolkit or if you have feedback on how I can improve it in the future. I am also interested in seeing projects that use any of my toolkits in practice! - -Website: https://gustavolsson.com/ - -Contact: https://gustavolsson.com/contact/ - -Copyright 2025 Gustav Olsson - - diff --git a/Assets/Scripts/ThirdParty/Rope/README-HTML.md.html.meta b/Assets/Scripts/ThirdParty/Rope/README-HTML.md.html.meta deleted file mode 100644 index e50ad1a3d..000000000 --- a/Assets/Scripts/ThirdParty/Rope/README-HTML.md.html.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 82f3b60f5fab61847b5d567d8c264192 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/README-PDF.pdf b/Assets/Scripts/ThirdParty/Rope/README-PDF.pdf deleted file mode 100644 index 644b8722a..000000000 Binary files a/Assets/Scripts/ThirdParty/Rope/README-PDF.pdf and /dev/null differ diff --git a/Assets/Scripts/ThirdParty/Rope/README-PDF.pdf.meta b/Assets/Scripts/ThirdParty/Rope/README-PDF.pdf.meta deleted file mode 100644 index bec7ee73a..000000000 --- a/Assets/Scripts/ThirdParty/Rope/README-PDF.pdf.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 9642f7274cbce494eac33c06ff0eb35a -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Rope.Editor.cs b/Assets/Scripts/ThirdParty/Rope/Rope.Editor.cs deleted file mode 100644 index 9b52ec4bc..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Rope.Editor.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Unity.Collections; -using Unity.Mathematics; -using UnityEngine; - -namespace NBF -{ - public partial class Rope - { -#if UNITY_EDITOR - public struct EditorColors - { - public Color ropeSegments; - public Color simulationParticle; - public Color collisionParticle; - public Color spawnPointHandle; - } - - public static readonly EditorColors Colors = new EditorColors() - { - ropeSegments = Color.black, - simulationParticle = new Color(0.2f, 0.8f, 0.2f, 0.5f), - collisionParticle = new Color(1.0f, 0.92f, 0.016f, 0.5f), - spawnPointHandle = new Color(0.1f, 0.5f, 0.8f), - }; - - public void OnDrawGizmos() - { - if (Application.isPlaying || spawnPoints.Count < 2 || !enabled) - { - return; - } - - ComputeRealCurve(Allocator.Temp, out Measurements measurements, out NativeArray points); - - Gizmos.color = Colors.ropeSegments; - for (int i = 0; i < points.Length - 1; i++) - { - Gizmos.DrawLine(points[i], points[i + 1]); - } - - if (UnityEditor.Selection.Contains(gameObject)) - { - for (int i = 0; i < points.Length; i++) - { - if (collisions.enabled && i % collisions.stride == 0) - { - Gizmos.color = Colors.collisionParticle; - } - else - { - Gizmos.color = Colors.simulationParticle; - } - - Gizmos.DrawSphere(points[i], radius); - } - } - - points.Dispose(); - } -#endif - } -} \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/Rope/Rope.Editor.cs.meta b/Assets/Scripts/ThirdParty/Rope/Rope.Editor.cs.meta deleted file mode 100644 index 5f3dca24e..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Rope.Editor.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: c6bf255fcd0641f4b1b400ab03fc1496 -timeCreated: 1762332174 \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/Rope/Rope.cs b/Assets/Scripts/ThirdParty/Rope/Rope.cs deleted file mode 100644 index 7141ee07e..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Rope.cs +++ /dev/null @@ -1,1399 +0,0 @@ -using System.Collections.Generic; -using Unity.Burst; -using Unity.Collections; -using Unity.Jobs; -using Unity.Mathematics; -using UnityEngine; -using UnityEngine.Profiling; -using UnityEngine.Rendering; - -namespace NBF -{ - public enum RopeInterpolation - { - None = 0, - Interpolate, - Extrapolate, - } - - public partial class Rope : MonoBehaviour - { - protected const int MaxCollisionPlanesPerParticle = 3; - protected const int InitialParticleTargets = 3; - protected const int MaxRigidbodyConnections = 24; - - public struct Measurements - { - public float spawnCurveLength; - public float realCurveLength; - public int segmentCount; - public int particleCount; - public float particleSpacing; - - public int GetParticleIndexAt(float distance) - { - return math.clamp((int)(distance / particleSpacing + 0.5f), 0, particleCount - 1); - } - } - - [Tooltip("绳子的半径。该值既用于构建视觉网格,也用于处理碰撞。")] [Range(0.0001f, 1.0f)] - public float radius = 0.05f; - - [Tooltip("用于渲染绳子的材质。这可以是任何使用顶点位置和可选法线的材质。")] - public Material material; - - [Tooltip("绳子使用的阴影投射模式")] public ShadowCastingMode shadowMode = ShadowCastingMode.On; - - [Tooltip("用于初始放置绳子在世界中的生成点。目前,连续的生成点对被视为线性线段。")] [DisableInPlayMode] - public List spawnPoints = new List(); - - [Tooltip("在FixedUpdate()调用之间使用的插值模式。只有在固定更新率较低时才有意义。有关更多信息,请参见Rigidbody.interpolation的文档。")] [DisableInPlayMode] - public RopeInterpolation interpolation = RopeInterpolation.None; - - [System.Serializable] - public struct SimulationSettings - { - [Tooltip("独立于绳子渲染打开或关闭模拟。用例可能是程序化地禁用距离相机太远或不可见的绳子。")] - public bool enabled; - - [Header("基本特性")] [Tooltip("每米的模拟粒子数。更高的分辨率会使绳子看起来更平滑,但需要更多计算。")] [DisableInPlayMode] - public float resolution; - - [Tooltip("绳子每米的质量。该值用于通过RopeRigidbodyConnection组件与刚体交互。")] [Delayed] - public float massPerMeter; - - [Tooltip("绳子刚度的度量。请注意,实际刚度在很大程度上取决于求解器迭代次数和使用的物理时间步长,如果更改一个值,可能需要重新调整其他值。这个特定值不影响性能。")] [Range(0.01f, 1.0f)] - public float stiffness; - - [Tooltip("每次固定更新时从模拟中移除的能量百分比。用于模拟空气阻力。不影响性能。")] [Range(0.0f, 1.0f)] - public float energyLoss; - - [Header("高级(更改这些将需要调整基本特性)")] - [Range(1, 10)] - [Tooltip("每个固定更新应分割成的子步数。高子步数会产生更硬的模拟,因为重力引起的微小偏转可以及早被抵消。例外情况是如果绳子在两个刚体之间固定,则项目的固定更新率决定刚度。")] - public int substeps; - - [Tooltip("为此绳子运行的求解器迭代次数。高分辨率绳子需要更多迭代才能变硬。更多迭代需要更多计算。")] [Range(1, 32)] - public int solverIterations; - } - - [Space] public SimulationSettings simulation = new SimulationSettings() - { - enabled = true, - resolution = 10.0f, - massPerMeter = 0.2f, - stiffness = 1.0f, - energyLoss = 0.0025f, - substeps = 4, - solverIterations = 2, - }; - - - [System.Serializable] - public struct CollisionSettings - { - [Tooltip("启用绳子的碰撞处理,使其对通过RopeConnection组件连接的碰撞器以外的碰撞器做出反应。对主线程性能要求很高。")] - public bool enabled; - - [Tooltip("绳子碰撞时是否应影响刚体。")] public bool influenceRigidbodies; - - [Tooltip("检查并响应每个第n个模拟粒子的碰撞。值为1将使每个模拟粒子都对碰撞做出反应,值为2将使每隔一个粒子对碰撞做出反应,以此类推。由于每个粒子执行一次球体重叠测试,低值非常消耗性能。当绳子被选中时,碰撞粒子由黄色球体可视化。")] - [Range(1, 20)] - public int stride; - - [Tooltip("防止小半径绳子容易穿过几何体的额外距离(添加到绳子半径之上)")] [Range(0.0f, 1.0f)] - public float collisionMargin; - - public LayerMask ignoreLayers; - } - - [Space] public CollisionSettings collisions = new CollisionSettings() - { - enabled = false, - influenceRigidbodies = true, - stride = 2, - collisionMargin = 0.025f, - ignoreLayers = 0, - }; - - protected struct CollisionPlane - { - public float3 point; - public float3 normal; - public float3 velocityChange; - - public float3 feedback; - } - - protected struct ParticleTarget - { - public int particleIndex; - public float3 position; - public float stiffness; - } - - protected struct RigidbodyConnection - { - public Rigidbody rigidbody; - public float rigidbodyDamping; - public ParticleTarget target; - } - - // 添加LineRenderer组件引用 - protected LineRenderer lineRenderer; - protected bool initialized; - protected bool computingSimulationFrame; - protected bool simulationDisabledPrevFrame; - - protected float timeSinceFixedUpdate; - protected JobHandle simulationFrameHandle; - - // State - protected NativeArray positions; - protected NativeArray prevPositions; - protected NativeArray interpolatedPositions; - protected NativeArray bitangents; - protected NativeArray massMultipliers; - - // Collision handling - protected NativeArray collisionPlanesActive; - protected NativeArray collisionPlanes; - protected Rigidbody[] collisionRigidbodies; - - // Rigidbody connections - protected List queuedRigidbodyConnections; - protected List liveRigidbodyConnections; - protected NativeArray particleTargets; - protected NativeArray particleTargetFeedbacks; - - protected Measurements _measurements; - - /// - /// 返回绳子的测量值。测量值在绳子首次初始化后保持不变。 - /// - public Measurements measurements - { - get - { - if (!Initialize()) - { - return new Measurements(); - } - - return _measurements; - } - } - - public void OnValidate() - { - simulation.resolution = Mathf.Max(0.01f, simulation.resolution); - simulation.massPerMeter = Mathf.Max(0.01f, simulation.massPerMeter); - } - - /// - /// 向绳子添加新的生成点。可以从编辑模式调用。 - /// - public void PushSpawnPoint() - { - if (spawnPoints.Count == 0) - { - spawnPoints.Add(Vector3.right); - return; - } - - var prev = spawnPoints.Count >= 2 ? spawnPoints[spawnPoints.Count - 2] : float3.zero; - var current = spawnPoints[spawnPoints.Count - 1]; - spawnPoints.Add(current + math.normalizesafe(current - prev)); - } - - /// - /// 移除绳子的最后一个生成点。可以从编辑模式调用。 - /// - public void PopSpawnPoint() - { - if (spawnPoints.Count <= 2) - { - return; - } - - spawnPoints.RemoveAt(spawnPoints.Count - 1); - } - - /// - /// 返回沿绳子曲线特定距离处的模拟粒子索引 - /// - /// 沿绳子曲线的距离 - /// 粒子索引 - public int GetParticleIndexAt(float distance) - { - if (!Initialize() || _measurements.particleSpacing == 0.0f) - { - return 0; - } - - return _measurements.GetParticleIndexAt(distance); - } - - /// - /// 返回特定模拟粒子所在位置沿绳子曲线的标量距离。标量距离是0到1之间的值。 - /// lengthMultiplier不考虑在内。要获得世界空间中沿绳子的距离,请将标量距离乘以realCurveLength测量值。 - /// - /// 模拟粒子的索引 - /// 标量距离 - public float GetScalarDistanceAt(int particleIndex) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return 0.0f; - } - - return math.clamp((float)particleIndex / (measurements.particleCount - 1), 0.0f, 1.0f); - } - - /// - /// 返回特定模拟粒子的当前位置 - /// - /// 模拟粒子的索引 - /// 返回的位置是否应遵循绳子的插值设置。 - /// 世界空间中的当前位置 - public float3 GetPositionAt(int particleIndex, bool respectInterpolation = false) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return float3.zero; - } - - CompletePreviousSimulationFrame(); - if (respectInterpolation && interpolation != RopeInterpolation.None) - { - return interpolatedPositions[particleIndex]; - } - else - { - return positions[particleIndex]; - } - } - - /// - /// 设置特定模拟粒子的位置。由于粒子使用的积分方案,这也会更新速度。 - /// 如果粒子的速度应保持不变,也在调用SetPositionAt()之前设置速度到调用时的值。 - /// 这样工作的原因是这种积分方案使得在遵守多个约束的同时更新位置变得容易。 - /// - /// 模拟粒子的索引 - /// 世界空间中的期望位置 - public void SetPositionAt(int particleIndex, float3 position) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return; - } - - CompletePreviousSimulationFrame(); - - positions[particleIndex] = position; - } - - /// - /// 设置特定模拟粒子的位置。由于粒子使用的积分方案,这也会更新速度。 - /// 如果粒子的速度应保持不变,也在调用SetPositionAt()之前设置速度到调用时的值。 - /// 这样工作的原因是这种积分方案使得在遵守多个约束的同时更新位置变得容易。 - /// - /// 模拟粒子的索引 - /// 世界空间中的期望位置 - /// 可使用的最大允许冲量强度。如果为零,则不应用限制。 - public void SetPositionAt(int particleIndex, float3 position, float maxImpulseStrength) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length || maxImpulseStrength < 0.0f) - { - return; - } - - CompletePreviousSimulationFrame(); - - if (maxImpulseStrength == 0.0f) - { - positions[particleIndex] = position; - } - else - { - var particleMass = massMultipliers[particleIndex] * simulation.massPerMeter * - _measurements.realCurveLength / _measurements.particleCount; - if (particleMass <= 0.0f) - { - return; - } - - var delta = position - positions[particleIndex]; - var integratedImpulse = delta * particleMass; - var integratedImpulseLength = math.length(integratedImpulse); - - var maxIntegratedImpulse = maxImpulseStrength * Time.fixedDeltaTime; - if (integratedImpulseLength > maxIntegratedImpulse) - { - integratedImpulse *= maxIntegratedImpulse / integratedImpulseLength; - } - - positions[particleIndex] += integratedImpulse / particleMass; - } - } - - /// - /// 返回特定模拟粒子的当前速度 - /// - /// 模拟粒子的索引 - /// 世界空间中的速度 - public float3 GetVelocityAt(int particleIndex) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return float3.zero; - } - - CompletePreviousSimulationFrame(); - return (positions[particleIndex] - prevPositions[particleIndex]) / Time.fixedDeltaTime; - } - - /// - /// 设置特定模拟粒子的速度 - /// - /// 模拟粒子的索引 - /// 世界空间中的期望速度 - public void SetVelocityAt(int particleIndex, float3 velocity) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return; - } - - CompletePreviousSimulationFrame(); - prevPositions[particleIndex] = positions[particleIndex] - velocity * Time.fixedDeltaTime; - } - - /// - /// 返回特定模拟粒子的质量倍增器。该值可用于增加或减少绳子部分的重量。 - /// 值为0将使粒子不可移动。值为2将使粒子比其邻居重两倍。默认值为1。 - /// - /// 模拟粒子的索引 - /// 质量倍增器 - public float GetMassMultiplierAt(int particleIndex) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return 0.0f; - } - - CompletePreviousSimulationFrame(); - return massMultipliers[particleIndex]; - } - - /// - /// 设置特定模拟粒子的质量倍增器。该值可用于增加或减少绳子部分的重量。 - /// 值为0将使粒子不可移动。值为2将使粒子比其邻居重两倍。默认值为1。 - /// - /// 模拟粒子的索引 - /// 期望的质量倍增器 - public void SetMassMultiplierAt(int particleIndex, float value) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return; - } - - CompletePreviousSimulationFrame(); - massMultipliers[particleIndex] = value; - } - - /// - /// 查找距离特定点最近的模拟粒子 - /// - /// 世界空间中的点 - /// 最近的模拟粒子的索引 - /// 世界空间中最近的模拟粒子沿绳子的距离 - public void GetClosestParticle(float3 point, out int particleIndex, out float distance) - { - if (!Initialize()) - { - particleIndex = -1; - distance = 0.0f; - return; - } - - CompletePreviousSimulationFrame(); - positions.GetClosestPoint(point, out particleIndex, out distance); - } - - /// - /// 查找距离特定射线最近的模拟粒子 - /// - /// 世界空间中的射线 - /// 最近的模拟粒子的索引 - /// 世界空间中最近的模拟粒子沿绳子的距离 - /// 沿射线到距离模拟粒子最近的点的距离 - public void GetClosestParticle(Ray ray, out int particleIndex, out float distance, out float distanceAlongRay) - { - if (!Initialize()) - { - particleIndex = -1; - distance = 0.0f; - distanceAlongRay = 0.0f; - return; - } - - CompletePreviousSimulationFrame(); - positions.GetClosestPoint(ray, out particleIndex, out distance, out distanceAlongRay); - } - - /// - /// 为下一个模拟帧注册刚体连接。刚体连接是模拟粒子到传统刚体的双向耦合。 - /// 确保从FixedUpdate()调用此方法。任何涉及刚体连接的模拟粒子将在模拟帧结束时将其质量倍增器重置为1。 - /// - /// 要连接的模拟粒子的索引 - /// 要连接的刚体 - /// 应用于刚体的阻尼量,范围[0, 1] - /// 刚体上要连接的世界空间点 - /// 连接的刚度,范围[0, 1] - public void RegisterRigidbodyConnection(int particleIndex, Rigidbody rigidbody, float rigidbodyDamping, - float3 pointOnBody, float stiffness) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length || !enabled || - !simulation.enabled) - { - return; - } - - queuedRigidbodyConnections.Add(new RigidbodyConnection() - { - rigidbody = rigidbody, - rigidbodyDamping = rigidbodyDamping, - target = new ParticleTarget() - { - particleIndex = particleIndex, - position = pointOnBody, - stiffness = stiffness, - }, - }); - } - - /// - /// 将绳子重置为其相对于当前变换的原始形状。在激活被停用和重新激活而不是销毁和实例化的池化游戏对象时很有用。 - /// - public void ResetToSpawnCurve() - { - if (!Initialize()) - { - return; - } - - CompletePreviousSimulationFrame(); - - var localToWorld = (float4x4)transform.localToWorldMatrix; - - spawnPoints.GetPointsAlongCurve(ref localToWorld, _measurements.particleSpacing, positions); - positions.CopyTo(prevPositions); - } - - /// - /// 计算绳子的当前长度。与measurements.realCurveLength字段相比,该值包括由于应力引起的绳子拉伸。 - /// - public float GetCurrentLength() - { - if (!Initialize()) - { - return 0.0f; - } - - CompletePreviousSimulationFrame(); - - return positions.GetLengthOfCurve(); - } - - #region 生命周期 - - public void OnEnable() - { - if (!initialized) - { - return; - } - - CompletePreviousSimulationFrame(); - } - - public void Start() - { - Initialize(); - } - - public void FixedUpdate() - { - timeSinceFixedUpdate = 0.0f; - - if (!initialized) - { - return; - } - - if (!simulation.enabled) - { - simulationDisabledPrevFrame = true; - return; - } - - CompletePreviousSimulationFrame(); // 固定更新可能在每个渲染帧中运行多次 - - if (simulationDisabledPrevFrame) - { - queuedRigidbodyConnections.Clear(); - liveRigidbodyConnections.Clear(); - } - - simulationDisabledPrevFrame = false; - - transform.position = positions[0]; - - ApplyRigidbodyFeedback(); // 来自前一帧 - - UpdateCollisionPlanes(); - - PrepareRigidbodyConnections(); - - ScheduleNextSimulationFrame(); - } - - public void LateUpdate() - { - timeSinceFixedUpdate += Time.deltaTime; - - if (!initialized) - { - return; - } - - if (interpolation != RopeInterpolation.None) - { - ScheduleInterpolation(); - } - - CompletePreviousSimulationFrame(); - - SubmitToRenderer(); - } - - public void OnDisable() - { - if (!initialized) - { - return; - } - - CompletePreviousSimulationFrame(); - - simulationDisabledPrevFrame = true; - } - - public void OnDestroy() - { - if (!initialized) - { - return; - } - - CompletePreviousSimulationFrame(); - - // 状态 - positions.Dispose(); - prevPositions.Dispose(); - if (interpolatedPositions.IsCreated) - { - interpolatedPositions.Dispose(); - } - - bitangents.Dispose(); - massMultipliers.Dispose(); - - // 碰撞处理 - collisionPlanesActive.Dispose(); - collisionPlanes.Dispose(); - collisionRigidbodies = null; - - // 刚体连接 - particleTargets.Dispose(); - particleTargetFeedbacks.Dispose(); - } - - - #endregion - - protected bool Initialize() - { - if (initialized) - { - return true; - } - - if (!Application.isPlaying || spawnPoints.Count < 2) - { - // 不适用于编辑模式执行 - return false; - } - - - lineRenderer = gameObject.GetComponent(); - if (lineRenderer == null) - { - lineRenderer = gameObject.AddComponent(); - } - - lineRenderer.useWorldSpace = true; - lineRenderer.widthMultiplier = radius; - lineRenderer.material = material; - lineRenderer.shadowCastingMode = shadowMode; - lineRenderer.receiveShadows = false; - lineRenderer.alignment = LineAlignment.View; - - - // 状态 - ComputeRealCurve(Allocator.Persistent, out _measurements, out positions); - - prevPositions = new NativeArray(_measurements.particleCount, Allocator.Persistent); - positions.CopyTo(prevPositions); - if (interpolation != RopeInterpolation.None) - { - interpolatedPositions = new NativeArray(_measurements.particleCount, Allocator.Persistent); - positions.CopyTo(interpolatedPositions); - } - - bitangents = new NativeArray(_measurements.particleCount, Allocator.Persistent); - { - var up = new float3(0.0f, 1.0f, 0.0f); - - for (int i = 0; i < bitangents.Length; i++) - { - var tangent = positions[(i + 1) % bitangents.Length] - positions[i]; - - var bitangent = math.normalizesafe(math.cross(up, tangent)); - if (math.all(bitangent == float3.zero)) - { - bitangent = math.normalizesafe(math.cross(up + new float3(0.0f, 0.0f, -1.0f), tangent)); - } - - bitangents[i] = bitangent; - - up = math.cross(tangent, bitangent); - } - - bitangents[bitangents.Length - 1] = bitangents[bitangents.Length - 2]; - } - - massMultipliers = new NativeArray(_measurements.particleCount, Allocator.Persistent); - for (int i = 0; i < massMultipliers.Length; i++) - { - massMultipliers[i] = 1.0f; - } - - // 碰撞处理 - collisionPlanesActive = new NativeArray(_measurements.particleCount, Allocator.Persistent); - collisionPlanes = - new NativeArray(_measurements.particleCount * MaxCollisionPlanesPerParticle, - Allocator.Persistent); - collisionRigidbodies = new Rigidbody[collisionPlanes.Length]; - - // 刚体连接 - queuedRigidbodyConnections = new List(); - liveRigidbodyConnections = new List(); - particleTargets = new NativeArray(InitialParticleTargets, Allocator.Persistent); - particleTargetFeedbacks = new NativeArray(InitialParticleTargets, Allocator.Persistent); - - initialized = true; - computingSimulationFrame = false; - return true; - } - - /// - /// 计算真实曲线 - /// - protected void ComputeRealCurve(Allocator allocator, out Measurements measurements, - out NativeArray points) - { - var localToWorld = (float4x4)transform.localToWorldMatrix; - - var spawnCurveLength = spawnPoints.GetLengthOfCurve(ref localToWorld); - var segmentCount = math.max(1, (int)(spawnCurveLength * simulation.resolution)); - var particleCount = segmentCount + 1; - var particleSpacing = spawnCurveLength / segmentCount; - - points = new NativeArray(particleCount, allocator); - spawnPoints.GetPointsAlongCurve(ref localToWorld, particleSpacing, points); - var realCurveLength = points.GetLengthOfCurve(ref localToWorld); - - measurements = new Measurements() - { - spawnCurveLength = spawnCurveLength, - realCurveLength = realCurveLength, - segmentCount = segmentCount, - particleCount = particleCount, - particleSpacing = particleSpacing, - }; - } - - - protected Collider[] collisionQueryBuffer = new Collider[MaxCollisionPlanesPerParticle]; - - /// - /// 更新碰撞平面 - /// - public void UpdateCollisionPlanes() - { - if (!collisions.enabled) - { - return; - } - - Profiler.BeginSample(nameof(UpdateCollisionPlanes)); - - var deltaTime = Time.fixedDeltaTime; - var layerMask = ~collisions.ignoreLayers; - var safeRadius = radius + collisions.collisionMargin; - var safeRadiusSq = safeRadius * safeRadius; - var extendedRadius = safeRadius * 1.5f; - - for (int i = 0; i < collisionPlanesActive.Length; i++) - { - if (i % collisions.stride != 0) - { - collisionPlanesActive[i] = 0; - for (int j = 0; j < MaxCollisionPlanesPerParticle; j++) - { - collisionRigidbodies[i * MaxCollisionPlanesPerParticle + j] = null; - } - - continue; - } - - var planeCount = 0; - - // 使用下一帧的投影位置 - var pos = positions[i]; - var prevPos = prevPositions[i]; - var vel = pos - prevPos; - prevPos = pos; - pos += vel; - - // 检查重叠 - var hitCount = - Physics.OverlapSphereNonAlloc(pos, extendedRadius, collisionQueryBuffer, - layerMask); // 使用稍大的球体来捕获更多碰撞 - for (int j = 0; j < hitCount && planeCount < MaxCollisionPlanesPerParticle; j++) - { - var collider = collisionQueryBuffer[j]; - var meshCollider = collider as MeshCollider; - - if (collider is BoxCollider || - collider is SphereCollider || - collider is CapsuleCollider || - (meshCollider != null && meshCollider.convex)) - { - var closestPoint = (float3)Physics.ClosestPoint(pos, collider, collider.transform.position, - collider.transform.rotation); - - var normal = math.normalizesafe(pos - closestPoint); - if (math.all(normal == float3.zero)) - { - continue; - } - - collisionPlanes[i * MaxCollisionPlanesPerParticle + planeCount] = new CollisionPlane() - { - point = closestPoint, - normal = normal, - velocityChange = collider.attachedRigidbody != null - ? (float3)collider.attachedRigidbody.GetPointVelocity(closestPoint) * deltaTime - : float3.zero, - }; - collisionRigidbodies[i * MaxCollisionPlanesPerParticle + planeCount] = - collider.attachedRigidbody; - planeCount++; - } - } - - // 检查快速移动 - if (planeCount < MaxCollisionPlanesPerParticle) - { - var movementSq = math.lengthsq(vel); - if (movementSq > safeRadiusSq) - { - if (Physics.Linecast(prevPos, pos, out RaycastHit hit, layerMask)) - { - collisionPlanes[i * MaxCollisionPlanesPerParticle + planeCount] = new CollisionPlane() - { - point = hit.point, - normal = hit.normal, - velocityChange = hit.rigidbody != null - ? (float3)hit.rigidbody.GetPointVelocity(hit.point) * deltaTime - : float3.zero, - }; - collisionRigidbodies[i * MaxCollisionPlanesPerParticle + planeCount] = hit.rigidbody; - planeCount++; - } - } - } - - collisionPlanesActive[i] = planeCount; - } - - Profiler.EndSample(); - } - - /// - /// 准备刚体连接 - /// - protected void PrepareRigidbodyConnections() - { - Profiler.BeginSample(nameof(PrepareRigidbodyConnections)); - - liveRigidbodyConnections.AddRange(queuedRigidbodyConnections); - queuedRigidbodyConnections.Clear(); - - if (liveRigidbodyConnections.Count > particleTargets.Length) - { - if (liveRigidbodyConnections.Count > MaxRigidbodyConnections) - { - Debug.LogWarning( - $"本帧遇到过多的活动刚体连接({liveRigidbodyConnections.Count})。" + - $"限制执行到最大值({MaxRigidbodyConnections})以避免性能下降..."); - } - else - { - var newCapacity = liveRigidbodyConnections.Count * 2; - - particleTargets.Dispose(); - particleTargets = new NativeArray(newCapacity, Allocator.Persistent); - particleTargetFeedbacks.Dispose(); - particleTargetFeedbacks = new NativeArray(newCapacity, Allocator.Persistent); - } - } - - for (int i = 0; i < particleTargets.Length; i++) - { - if (i < liveRigidbodyConnections.Count) - { - var c = liveRigidbodyConnections[i]; - - if (!c.rigidbody) - { - c.target.stiffness = 0.0f; - } - - particleTargets[i] = c.target; - - // 如果刚体是运动学的,则使粒子不可移动 - if (c.rigidbody && c.rigidbody.isKinematic) - { - massMultipliers[c.target.particleIndex] = 0.0f; - } - } - else - { - particleTargets[i] = new ParticleTarget() - { - particleIndex = -1, - }; - } - } - - Profiler.EndSample(); - } - - /// - /// 应用刚体反馈 - /// - protected void ApplyRigidbodyFeedback() - { - Profiler.BeginSample(nameof(ApplyRigidbodyFeedback)); - - var particleMass = simulation.massPerMeter * _measurements.realCurveLength / _measurements.particleCount; - var invDtAndSim = 1.0f / (Time.fixedDeltaTime * simulation.substeps * simulation.solverIterations); - - // 碰撞 - if (collisions.enabled && collisions.influenceRigidbodies) - { - for (int i = 0; i < collisionPlanesActive.Length; i++) - { - if (i % collisions.stride != 0) - { - continue; - } - - int activePlaneCount = collisionPlanesActive[i]; - for (int j = 0; j < activePlaneCount; j++) - { - Rigidbody rb = collisionRigidbodies[i * MaxCollisionPlanesPerParticle + j]; - if (rb != null && !rb.isKinematic) - { - CollisionPlane plane = collisionPlanes[i * MaxCollisionPlanesPerParticle + j]; - float3 impulse = plane.feedback * (particleMass * invDtAndSim); - rb.ApplyImpulseNow(plane.point, impulse); - } - } - } - } - - // 连接 - if (liveRigidbodyConnections.Count > 0) - { - var iterationCount = math.min(liveRigidbodyConnections.Count, particleTargetFeedbacks.Length); - - for (int i = 0; i < iterationCount; i++) - { - var c = liveRigidbodyConnections[i]; - - // 应用冲量 - if (c.rigidbody) - { - float3 impulse = particleTargetFeedbacks[i] * (particleMass * invDtAndSim); - c.rigidbody.ApplyImpulseNow(c.target.position, impulse); - - if (c.rigidbodyDamping > 0.0f) - { - float3 normal = math.normalizesafe(impulse); - c.rigidbody.SetPointVelocityNow(c.target.position, normal, 0.0f, c.rigidbodyDamping); - } - } - - // 重置粒子质量倍增器(如果身体是运动学的可能已更改) - massMultipliers[c.target.particleIndex] = 1.0f; - } - - liveRigidbodyConnections.Clear(); - } - - Profiler.EndSample(); - } - - /// - /// 安排下一个模拟帧 - /// - protected void ScheduleNextSimulationFrame() - { - Profiler.BeginSample(nameof(ScheduleNextSimulationFrame)); - - computingSimulationFrame = true; - - var gravity = (float3)Physics.gravity; - - var simulate = new SimulateJob() - { - deltaTime = Time.fixedDeltaTime, - externalAcceleration = gravity, - energyKept = 1.0f - simulation.energyLoss, - - positions = positions, - prevPositions = prevPositions, - massMultipliers = massMultipliers, - - substeps = simulation.substeps, - solverIterations = simulation.solverIterations, - stiffness = simulation.stiffness, - desiredSpacing = _measurements.particleSpacing, - - collisionsEnabled = collisions.enabled, - radius = radius + collisions.collisionMargin, - maxCollisionPlanesPerParticle = MaxCollisionPlanesPerParticle, - collisionPlanesActive = collisionPlanesActive, - collisionPlanes = collisionPlanes, - - particleTargets = particleTargets, - particleTargetFeedbacks = particleTargetFeedbacks, - }.Schedule(); - - if (interpolation == RopeInterpolation.None) - { - simulationFrameHandle = new OutputVerticesJob() - { - positions = positions, - bitangents = bitangents, - }.Schedule(simulate); - } - else - { - // OutputVerticesJob必须在插值之后发生,而插值发生在Update()中,而不是FixedUpdate() - simulationFrameHandle = simulate; - } - - JobHandle.ScheduleBatchedJobs(); - - Profiler.EndSample(); - } - - /// - /// 时间表插值 - /// - protected void ScheduleInterpolation() - { - if (interpolation == RopeInterpolation.None) - { - return; - } - - CompletePreviousSimulationFrame(); - - Profiler.BeginSample(nameof(ScheduleInterpolation)); - - computingSimulationFrame = true; - - var invDt = 1.0f / Time.fixedDeltaTime; - - JobHandle handle; - - if (interpolation == RopeInterpolation.Interpolate) - { - handle = new InterpolatePositionsJob() - { - positions = positions, - prevPositions = prevPositions, - - invDeltaTime = invDt, - timeSinceFixedUpdate = timeSinceFixedUpdate, - - interpolatedPositions = interpolatedPositions, - }.Schedule(); - } - else - { - handle = new ExtrapolatePositionsJob() - { - positions = positions, - prevPositions = prevPositions, - - invDeltaTime = invDt, - timeSinceFixedUpdate = timeSinceFixedUpdate, - - interpolatedPositions = interpolatedPositions, - }.Schedule(); - } - - simulationFrameHandle = new OutputVerticesJob() - { - positions = interpolatedPositions, - bitangents = bitangents, - }.Schedule(handle); - - JobHandle.ScheduleBatchedJobs(); - - Profiler.EndSample(); - } - - /// - /// 完成先前的模拟帧 - /// - protected void CompletePreviousSimulationFrame() - { - if (!computingSimulationFrame) - { - return; - } - - Profiler.BeginSample(nameof(CompletePreviousSimulationFrame)); - - simulationFrameHandle.Complete(); - computingSimulationFrame = false; - - Profiler.EndSample(); - } - - protected void SubmitToRenderer() - { - if (material == null) - { - return; - } - - Profiler.BeginSample(nameof(SubmitToRenderer)); - - // 使用简单线渲染 - if (lineRenderer != null && simulation.enabled) - { - lineRenderer.positionCount = positions.Length; - for (int i = 0; i < positions.Length; i++) - { - lineRenderer.SetPosition(i, positions[i]); - } - } - - - Profiler.EndSample(); - } - - - #region Jobs - - [BurstCompile] - private struct SimulateJob : IJob - { - [ReadOnly] public float deltaTime; - [ReadOnly] public float3 externalAcceleration; - [ReadOnly] public float energyKept; - - // 状态 - public NativeArray positions; - public NativeArray prevPositions; - [ReadOnly] public NativeArray massMultipliers; - - // 形状 - [ReadOnly] public int substeps; - [ReadOnly] public int solverIterations; - [ReadOnly] public float stiffness; - [ReadOnly] public float desiredSpacing; - - // 碰撞处理 - [ReadOnly] public bool collisionsEnabled; - [ReadOnly] public float radius; - [ReadOnly] public int maxCollisionPlanesPerParticle; - [ReadOnly] public NativeArray collisionPlanesActive; - public NativeArray collisionPlanes; - - // 刚体附件 - [ReadOnly] public NativeArray particleTargets; - public NativeArray particleTargetFeedbacks; - - public void Execute() - { - // 准备模拟 - for (int i = 0; i < particleTargetFeedbacks.Length; i++) - { - particleTargetFeedbacks[i] = float3.zero; - } - - // 模拟 - float dt = deltaTime / substeps; - float invDt = 1.0f / dt; - bool forwardSolve = true; - - for (int substep = 0; substep < substeps; substep++) - { - for (int i = 0; i < positions.Length; i++) - { - if (massMultipliers[i] == 0.0f) - { - prevPositions[i] = positions[i]; - continue; - } - - var pos = positions[i]; - var prevPos = prevPositions[i]; - - var vel = (pos - prevPos) * invDt; - vel += externalAcceleration * dt; - vel *= energyKept; - - prevPositions[i] = pos; - positions[i] += vel * dt; - } - - for (int iter = 0; iter < solverIterations; iter++) - { - int loopCount = positions.Length - 1; - - // 应用杆约束 - if (forwardSolve) // 交替向前和向后求解以平衡误差 - { - for (int i = 0; i < loopCount; i++) - { - ApplyStickConstraint(i, (i + 1) % positions.Length); - } - } - else - { - for (int i = loopCount - 1; i >= 0; i--) - { - ApplyStickConstraint(i, (i + 1) % positions.Length); - } - } - - forwardSolve = !forwardSolve; - - // 应用碰撞约束 - if (collisionsEnabled) - { - for (int i = 0; i < positions.Length; i++) - { - for (int j = 0; j < collisionPlanesActive[i]; j++) - { - int planeIndex = i * maxCollisionPlanesPerParticle + j; - CollisionPlane plane = collisionPlanes[planeIndex]; - ApplyCollisionConstraint(i, ref plane); - collisionPlanes[planeIndex] = plane; - } - } - } - - // 应用刚体连接 - for (int i = 0; i < particleTargets.Length; i++) - { - var target = particleTargets[i]; - if (target.particleIndex == -1) - { - continue; - } - - var delta = (target.position - positions[target.particleIndex]) * target.stiffness; - positions[target.particleIndex] += delta; - particleTargetFeedbacks[i] -= delta * massMultipliers[target.particleIndex]; - } - } - } - } - - private void ApplyStickConstraint(int idx0, int idx1) - { - var delta = positions[idx0] - positions[idx1]; - var dist = math.length(delta); - if (dist > 0.0f) - { - delta /= dist; - } - else - { - delta = 0.0f; - } - - var correction = (dist - desiredSpacing) * stiffness; - - var w0 = massMultipliers[idx0]; - if (w0 > 0.0f) - { - w0 = 1.0f / w0; - } - - var w1 = massMultipliers[idx1]; - if (w1 > 0.0f) - { - w1 = 1.0f / w1; - } - - var invSumW = w0 + w1; - if (invSumW > 0.0f) - { - invSumW = 1.0f / invSumW; - } - - positions[idx0] -= delta * (correction * w0 * invSumW); - positions[idx1] += delta * (correction * w1 * invSumW); - } - - private void ApplyCollisionConstraint(int idx, ref CollisionPlane plane) - { - float dist = math.dot(positions[idx] - plane.point, plane.normal); - if (dist <= radius) - { - float depth = radius - dist; - float3 correction = plane.normal * depth; - positions[idx] += correction; - plane.feedback -= correction * massMultipliers[idx]; - - // 摩擦 - var delta = (positions[idx] - prevPositions[idx]) - plane.velocityChange; - var length = math.lengthsq(delta); - if (length > 0.0f) - { - length = math.sqrt(length); - delta /= length; - } - - prevPositions[idx] += delta * math.min(0, length); - } - } - } - - /// - /// 位置插值计算,用于在渲染时平滑显示绳子的位置变化。 - /// - [BurstCompile] - private struct InterpolatePositionsJob : IJob - { - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray prevPositions; - - [ReadOnly] public float invDeltaTime; - [ReadOnly] public float timeSinceFixedUpdate; - - [WriteOnly] public NativeArray interpolatedPositions; - - public void Execute() - { - var scalar = timeSinceFixedUpdate * invDeltaTime; - - for (int i = 0; i < interpolatedPositions.Length; i++) - { - interpolatedPositions[i] = math.lerp(prevPositions[i], positions[i], scalar); - } - } - } - - /// - /// 进行位置外推计算,用于在渲染时预测和显示绳子的未来位置。 - /// - [BurstCompile] - private struct ExtrapolatePositionsJob : IJob - { - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray prevPositions; - - [ReadOnly] public float invDeltaTime; - [ReadOnly] public float timeSinceFixedUpdate; - - [WriteOnly] public NativeArray interpolatedPositions; - - public void Execute() - { - for (int i = 0; i < interpolatedPositions.Length; i++) - { - var vel = (positions[i] - prevPositions[i]) * invDeltaTime; - interpolatedPositions[i] = positions[i] + vel * timeSinceFixedUpdate; - } - } - } - - /// - /// 计算平滑的双切线(bitangent) 对相邻顶点的切线进行平均处理,使绳子渲染更加平滑 - /// - [BurstCompile] - private struct OutputVerticesJob : IJob - { - [ReadOnly] public NativeArray positions; - - public NativeArray bitangents; - - public void Execute() - { - var last = positions.Length - 1; - - // 扩散双切线 - var smoothedBitangents = new NativeArray(bitangents.Length, Allocator.Temp); - - smoothedBitangents[0] = bitangents[0] + bitangents[1]; - - for (int i = 1; i < bitangents.Length - 1; i++) - { - smoothedBitangents[i] = bitangents[i - 1] + bitangents[i] + bitangents[i + 1]; - } - - smoothedBitangents[last] = bitangents[last - 1] + bitangents[last]; - - // 重新标准化双切线 - for (int i = 0; i < bitangents.Length; i++) - { - var tangent = positions[(i + 1) % positions.Length] - positions[i]; - var normal = math.cross(tangent, smoothedBitangents[i]); - - bitangents[i] = math.normalizesafe(math.cross(normal, tangent)); - } - - - bitangents[last] = bitangents[last - 1]; - } - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/Rope/Rope.cs.meta b/Assets/Scripts/ThirdParty/Rope/Rope.cs.meta deleted file mode 100644 index 46af20933..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Rope.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 325b217b839086b4ca705834516bc0d5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 100 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ThirdParty/Rope/Rope2.cs b/Assets/Scripts/ThirdParty/Rope/Rope2.cs deleted file mode 100644 index 786fd5535..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Rope2.cs +++ /dev/null @@ -1,1805 +0,0 @@ -using System.Collections.Generic; -using Unity.Burst; -using Unity.Collections; -using Unity.Jobs; -using Unity.Mathematics; -using UnityEngine; -using UnityEngine.Profiling; -using UnityEngine.Rendering; - -namespace NBF -{ - - public class Rope2 : MonoBehaviour - { - protected const int MaxCollisionPlanesPerParticle = 3; - protected const int InitialParticleTargets = 3; - protected const int MaxRigidbodyConnections = 24; - - public struct Measurements - { - public float spawnCurveLength; - public float realCurveLength; - public int segmentCount; - public int particleCount; - public float particleSpacing; - - public int GetParticleIndexAt(float distance) - { - return math.clamp((int)(distance / particleSpacing + 0.5f), 0, particleCount - 1); - } - } - - public struct OnSplitParams - { - public int minParticleIndex; - public int maxParticleIndex; - public Measurements preSplitMeasurements; - } - - public struct EditorColors - { - public Color ropeSegments; - public Color simulationParticle; - public Color collisionParticle; - public Color spawnPointHandle; - } - - public static readonly EditorColors Colors = new EditorColors() - { - ropeSegments = Color.black, - simulationParticle = new Color(0.2f, 0.8f, 0.2f, 0.5f), - collisionParticle = new Color(1.0f, 0.92f, 0.016f, 0.5f), - spawnPointHandle = new Color(0.1f, 0.5f, 0.8f), - }; - - [Tooltip("绳子的半径。该值既用于构建视觉网格,也用于处理碰撞。")] [Range(0.001f, 1.0f)] - public float radius = 0.05f; - - [Tooltip("绳子的视觉网格中每个段使用的顶点数。更多的顶点会使绳子看起来更圆,但会增加视觉网格的总体顶点和三角形数量。该值不会影响绳子的模拟。")] - [DisableInPlayMode] - [Range(3, 32)] - public int radialVertices = 6; - - [Tooltip("绳子是否为圆形环。如果启用,绳子的最后一个生成点将连接到第一个生成点。")] [DisableInPlayMode] - public bool isLoop = false; - - [Tooltip("用于渲染绳子的材质。这可以是任何使用顶点位置和可选法线的材质。")] - public Material material; - - [Tooltip("绳子使用的阴影投射模式")] public ShadowCastingMode shadowMode = ShadowCastingMode.On; - - [System.Serializable] - public struct RenderingSettings - { - [Tooltip("使用简单线渲染而非完整网格渲染。适用于细绳如鱼线,性能更好。")] - public bool useSimpleLineRenderer; - - [Tooltip("简单线渲染的宽度。")] - public float simpleLineWidth; - } - - [Space] public RenderingSettings rendering = new RenderingSettings() - { - useSimpleLineRenderer = false, - simpleLineWidth = 0.02f - }; - - // public CustomMeshSettings customMesh = new CustomMeshSettings() - // { - // mesh = null, - // rotation = 90.0f, - // scale = Vector3.one, - // stretch = false, - // }; - - [Tooltip("用于初始放置绳子在世界中的生成点。目前,连续的生成点对被视为线性线段。")] [DisableInPlayMode] - public List spawnPoints = new List(); - - [Tooltip("在FixedUpdate()调用之间使用的插值模式。只有在固定更新率较低时才有意义。有关更多信息,请参见Rigidbody.interpolation的文档。")] [DisableInPlayMode] - public RopeInterpolation interpolation = RopeInterpolation.None; - - [System.Serializable] - public struct SimulationSettings - { - [Tooltip("独立于绳子渲染打开或关闭模拟。用例可能是程序化地禁用距离相机太远或不可见的绳子。")] - public bool enabled; - - [Header("基本特性")] [Tooltip("每米的模拟粒子数。更高的分辨率会使绳子看起来更平滑,但需要更多计算。")] [DisableInPlayMode] - public float resolution; - - [Tooltip("绳子每米的质量。该值用于通过RopeRigidbodyConnection组件与刚体交互。")] [Delayed] - public float massPerMeter; - - [Tooltip("绳子刚度的度量。请注意,实际刚度在很大程度上取决于求解器迭代次数和使用的物理时间步长,如果更改一个值,可能需要重新调整其他值。这个特定值不影响性能。")] [Range(0.01f, 1.0f)] - public float stiffness; - - [Tooltip("每次固定更新时从模拟中移除的能量百分比。用于模拟空气阻力。不影响性能。")] [Range(0.0f, 1.0f)] - public float energyLoss; - - [Header("修改器")] [Tooltip("一个动态缩短或延长绳子的乘法因子。例如,这可以用于创建可伸缩的抓钩。")] [Range(0.0f, 2.0f)] - public float lengthMultiplier; - - [Tooltip("应用于绳子的重力百分比。较低的重力倍增器可能有助于拉直否则会下垂的绳子,但应被视为'hack',因为绳子会表现得像在太空中一样。")] [Range(0.0f, 1.0f)] - public float gravityMultiplier; - - [Tooltip("是否使用此组件的自定义重力值或全局物理重力")] public bool useCustomGravity; - - [Tooltip("不使用全局重力时,此特定绳子使用的重力")] public float3 customGravity; - - [Header("高级(更改这些将需要调整基本特性)")] - [Range(1, 10)] - [Tooltip("每个固定更新应分割成的子步数。高子步数会产生更硬的模拟,因为重力引起的微小偏转可以及早被抵消。例外情况是如果绳子在两个刚体之间固定,则项目的固定更新率决定刚度。")] - public int substeps; - - [Tooltip("为此绳子运行的求解器迭代次数。高分辨率绳子需要更多迭代才能变硬。更多迭代需要更多计算。")] [Range(1, 32)] - public int solverIterations; - } - - [Space] public SimulationSettings simulation = new SimulationSettings() - { - enabled = true, - resolution = 10.0f, - massPerMeter = 0.2f, - stiffness = 1.0f, - lengthMultiplier = 1.0f, - energyLoss = 0.0025f, - gravityMultiplier = 1.0f, - useCustomGravity = false, - customGravity = Physics.gravity, - substeps = 4, - solverIterations = 2, - }; - - - [System.Serializable] - public struct CollisionSettings - { - [Tooltip("启用绳子的碰撞处理,使其对通过RopeConnection组件连接的碰撞器以外的碰撞器做出反应。对主线程性能要求很高。")] - public bool enabled; - - [Tooltip("绳子碰撞时是否应影响刚体。")] public bool influenceRigidbodies; - - [Tooltip( - "检查并响应每个第n个模拟粒子的碰撞。值为1将使每个模拟粒子都对碰撞做出反应,值为2将使每隔一个粒子对碰撞做出反应,以此类推。由于每个粒子执行一次球体重叠测试,低值非常消耗性能。当绳子被选中时,碰撞粒子由黄色球体可视化。")] - [Range(1, 20)] - public int stride; - - [Tooltip("绳子的动态摩擦系数。用于在绳子被拖拽时减慢绳子的速度。")] [Range(0.0f, 20.0f)] - public float friction; - - [Tooltip("防止小半径绳子容易穿过几何体的额外距离(添加到绳子半径之上)")] [Range(0.0f, 1.0f)] - public float collisionMargin; - - public LayerMask ignoreLayers; - } - - [Space] public CollisionSettings collisions = new CollisionSettings() - { - enabled = false, - influenceRigidbodies = true, - stride = 2, - friction = 0.1f, - collisionMargin = 0.025f, - ignoreLayers = 0, - }; - - protected struct CollisionPlane - { - public float3 point; - public float3 normal; - public float3 velocityChange; - - public float3 feedback; - } - - protected struct ParticleTarget - { - public int particleIndex; - public float3 position; - public float stiffness; - } - - protected struct RigidbodyConnection - { - public Rigidbody rigidbody; - public float rigidbodyDamping; - public ParticleTarget target; - } - - // 添加LineRenderer组件引用 - protected LineRenderer lineRenderer; - protected bool initialized; - protected bool computingSimulationFrame; - protected bool simulationDisabledPrevFrame; - protected bool wasSplit; - protected float timeSinceFixedUpdate; - protected JobHandle simulationFrameHandle; - - // State - protected NativeArray positions; - protected NativeArray prevPositions; - protected NativeArray interpolatedPositions; - protected NativeArray bitangents; - protected NativeArray massMultipliers; - - // Collision handling - protected NativeArray collisionPlanesActive; - protected NativeArray collisionPlanes; - protected Rigidbody[] collisionRigidbodies; - - // Rigidbody connections - protected List queuedRigidbodyConnections; - protected List liveRigidbodyConnections; - protected NativeArray particleTargets; - protected NativeArray particleTargetFeedbacks; - - // Rendering - protected NativeArray vertices; - protected NativeArray normals; - protected NativeArray cosLookup; - protected NativeArray sinLookup; - - protected Mesh mesh; - - protected Measurements _measurements; - - /// - /// 返回绳子的测量值。测量值在绳子首次初始化后保持不变。 - /// - public Measurements measurements - { - get - { - if (!Initialize()) - { - return new Measurements(); - } - - return _measurements; - } - } - - /// - /// 视觉网格的当前世界空间边界 - /// - public Bounds currentBounds - { - get - { - if (!Initialize()) - { - return new Bounds(); - } - - return mesh.bounds; - } - } - - public void OnValidate() - { - simulation.resolution = Mathf.Max(0.01f, simulation.resolution); - simulation.massPerMeter = Mathf.Max(0.01f, simulation.massPerMeter); - rendering.simpleLineWidth = Mathf.Max(0.001f, rendering.simpleLineWidth); - } - - /// - /// 向绳子添加新的生成点。可以从编辑模式调用。 - /// - public void PushSpawnPoint() - { - if (spawnPoints.Count == 0) - { - spawnPoints.Add(Vector3.right); - return; - } - - var prev = spawnPoints.Count >= 2 ? spawnPoints[spawnPoints.Count - 2] : float3.zero; - var current = spawnPoints[spawnPoints.Count - 1]; - spawnPoints.Add(current + math.normalizesafe(current - prev)); - } - - /// - /// 移除绳子的最后一个生成点。可以从编辑模式调用。 - /// - public void PopSpawnPoint() - { - if (spawnPoints.Count <= 2) - { - return; - } - - spawnPoints.RemoveAt(spawnPoints.Count - 1); - } - - /// - /// 返回沿绳子曲线特定距离处的模拟粒子索引 - /// - /// 沿绳子曲线的距离 - /// 粒子索引 - public int GetParticleIndexAt(float distance) - { - if (!Initialize() || _measurements.particleSpacing == 0.0f) - { - return 0; - } - - return _measurements.GetParticleIndexAt(distance); - } - - /// - /// 返回特定模拟粒子所在位置沿绳子曲线的标量距离。标量距离是0到1之间的值。 - /// lengthMultiplier不考虑在内。要获得世界空间中沿绳子的距离,请将标量距离乘以realCurveLength测量值。 - /// - /// 模拟粒子的索引 - /// 标量距离 - public float GetScalarDistanceAt(int particleIndex) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return 0.0f; - } - - return math.clamp((float)particleIndex / (measurements.particleCount - 1), 0.0f, 1.0f); - } - - /// - /// 返回特定模拟粒子的当前位置 - /// - /// 模拟粒子的索引 - /// 返回的位置是否应遵循绳子的插值设置。 - /// 世界空间中的当前位置 - public float3 GetPositionAt(int particleIndex, bool respectInterpolation = false) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return float3.zero; - } - - CompletePreviousSimulationFrame(); - if (respectInterpolation && interpolation != RopeInterpolation.None) - { - return interpolatedPositions[particleIndex]; - } - else - { - return positions[particleIndex]; - } - } - - /// - /// 设置特定模拟粒子的位置。由于粒子使用的积分方案,这也会更新速度。 - /// 如果粒子的速度应保持不变,也在调用SetPositionAt()之前设置速度到调用时的值。 - /// 这样工作的原因是这种积分方案使得在遵守多个约束的同时更新位置变得容易。 - /// - /// 模拟粒子的索引 - /// 世界空间中的期望位置 - /// 可使用的最大允许冲量强度。如果为零,则不应用限制。 - public void SetPositionAt(int particleIndex, float3 position) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return; - } - - CompletePreviousSimulationFrame(); - - positions[particleIndex] = position; - } - - /// - /// 设置特定模拟粒子的位置。由于粒子使用的积分方案,这也会更新速度。 - /// 如果粒子的速度应保持不变,也在调用SetPositionAt()之前设置速度到调用时的值。 - /// 这样工作的原因是这种积分方案使得在遵守多个约束的同时更新位置变得容易。 - /// - /// 模拟粒子的索引 - /// 世界空间中的期望位置 - /// 可使用的最大允许冲量强度。如果为零,则不应用限制。 - public void SetPositionAt(int particleIndex, float3 position, float maxImpulseStrength) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length || maxImpulseStrength < 0.0f) - { - return; - } - - CompletePreviousSimulationFrame(); - - if (maxImpulseStrength == 0.0f) - { - positions[particleIndex] = position; - } - else - { - var particleMass = massMultipliers[particleIndex] * simulation.massPerMeter * - _measurements.realCurveLength / _measurements.particleCount; - if (particleMass <= 0.0f) - { - return; - } - - var delta = position - positions[particleIndex]; - var integratedImpulse = delta * particleMass; - var integratedImpulseLength = math.length(integratedImpulse); - - var maxIntegratedImpulse = maxImpulseStrength * Time.fixedDeltaTime; - if (integratedImpulseLength > maxIntegratedImpulse) - { - integratedImpulse *= maxIntegratedImpulse / integratedImpulseLength; - } - - positions[particleIndex] += integratedImpulse / particleMass; - } - } - - /// - /// 返回特定模拟粒子的当前速度 - /// - /// 模拟粒子的索引 - /// 世界空间中的速度 - public float3 GetVelocityAt(int particleIndex) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return float3.zero; - } - - CompletePreviousSimulationFrame(); - return (positions[particleIndex] - prevPositions[particleIndex]) / Time.fixedDeltaTime; - } - - /// - /// 设置特定模拟粒子的速度 - /// - /// 模拟粒子的索引 - /// 世界空间中的期望速度 - public void SetVelocityAt(int particleIndex, float3 velocity) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return; - } - - CompletePreviousSimulationFrame(); - prevPositions[particleIndex] = positions[particleIndex] - velocity * Time.fixedDeltaTime; - } - - /// - /// 返回特定模拟粒子的质量倍增器。该值可用于增加或减少绳子部分的重量。 - /// 值为0将使粒子不可移动。值为2将使粒子比其邻居重两倍。默认值为1。 - /// - /// 模拟粒子的索引 - /// 质量倍增器 - public float GetMassMultiplierAt(int particleIndex) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return 0.0f; - } - - CompletePreviousSimulationFrame(); - return massMultipliers[particleIndex]; - } - - /// - /// 设置特定模拟粒子的质量倍增器。该值可用于增加或减少绳子部分的重量。 - /// 值为0将使粒子不可移动。值为2将使粒子比其邻居重两倍。默认值为1。 - /// - /// 模拟粒子的索引 - /// 期望的质量倍增器 - public void SetMassMultiplierAt(int particleIndex, float value) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length) - { - return; - } - - CompletePreviousSimulationFrame(); - massMultipliers[particleIndex] = value; - } - - /// - /// 查找距离特定点最近的模拟粒子 - /// - /// 世界空间中的点 - /// 最近的模拟粒子的索引 - /// 世界空间中最近的模拟粒子沿绳子的距离 - public void GetClosestParticle(float3 point, out int particleIndex, out float distance) - { - if (!Initialize()) - { - particleIndex = -1; - distance = 0.0f; - return; - } - - CompletePreviousSimulationFrame(); - positions.GetClosestPoint(point, out particleIndex, out distance); - } - - /// - /// 查找距离特定射线最近的模拟粒子 - /// - /// 世界空间中的射线 - /// 最近的模拟粒子的索引 - /// 世界空间中最近的模拟粒子沿绳子的距离 - /// 沿射线到距离模拟粒子最近的点的距离 - public void GetClosestParticle(Ray ray, out int particleIndex, out float distance, out float distanceAlongRay) - { - if (!Initialize()) - { - particleIndex = -1; - distance = 0.0f; - distanceAlongRay = 0.0f; - return; - } - - CompletePreviousSimulationFrame(); - positions.GetClosestPoint(ray, out particleIndex, out distance, out distanceAlongRay); - } - - /// - /// 为下一个模拟帧注册刚体连接。刚体连接是模拟粒子到传统刚体的双向耦合。 - /// 确保从FixedUpdate()调用此方法。任何涉及刚体连接的模拟粒子将在模拟帧结束时将其质量倍增器重置为1。 - /// - /// 要连接的模拟粒子的索引 - /// 要连接的刚体 - /// 应用于刚体的阻尼量,范围[0, 1] - /// 刚体上要连接的世界空间点 - /// 连接的刚度,范围[0, 1] - public void RegisterRigidbodyConnection(int particleIndex, Rigidbody rigidbody, float rigidbodyDamping, - float3 pointOnBody, float stiffness) - { - if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length || !enabled || - !simulation.enabled) - { - return; - } - - queuedRigidbodyConnections.Add(new RigidbodyConnection() - { - rigidbody = rigidbody, - rigidbodyDamping = rigidbodyDamping, - target = new ParticleTarget() - { - particleIndex = particleIndex, - position = pointOnBody, - stiffness = stiffness, - }, - }); - } - - /// - /// 将绳子重置为其相对于当前变换的原始形状。在激活被停用和重新激活而不是销毁和实例化的池化游戏对象时很有用。 - /// - public void ResetToSpawnCurve() - { - if (!Initialize()) - { - return; - } - - CompletePreviousSimulationFrame(); - - var localToWorld = (float4x4)transform.localToWorldMatrix; - - spawnPoints.GetPointsAlongCurve(ref localToWorld, _measurements.particleSpacing, positions); - positions.CopyTo(prevPositions); - } - - /// - /// 计算绳子的当前长度。与measurements.realCurveLength字段相比,该值包括由于应力引起的绳子拉伸。 - /// - public float GetCurrentLength() - { - if (!Initialize()) - { - return 0.0f; - } - - CompletePreviousSimulationFrame(); - - return positions.GetLengthOfCurve(); - } - - protected Rope2 InstantiateSplitRope(int minIdx, int maxIdx, string identifier) - { - var count = maxIdx - minIdx + 1; - if (minIdx < 0 || maxIdx > positions.Length - 1 || count < 2) - { - return null; - } - - // 创建两个大致放置在新绳子位置的生成点(这将创建漂亮的双切线) - var targetLength = _measurements.realCurveLength * ((float)count / _measurements.particleCount); - var point0 = positions[minIdx]; - var point1 = positions[maxIdx]; - var delta = point1 - point0; - var simplifiedLength = math.length(delta); - point1 += math.normalizesafe(delta) * (targetLength - simplifiedLength); - - var rope = Instantiate(gameObject, Vector3.zero, Quaternion.identity).GetComponent(); - rope.name = identifier; - rope.isLoop = false; - rope.spawnPoints = new List() - { - point0, - point1, - }; - - if (rope.Initialize()) - { - // 现在更新模拟粒子以完全匹配原始绳子 - for (int i = 0; i < rope.positions.Length; i++) - { - var sourceIdx = minIdx + i; - if (sourceIdx >= positions.Length) - { - break; - } - - rope.positions[i] = positions[sourceIdx]; - rope.prevPositions[i] = prevPositions[sourceIdx]; - } - - // 使新绳子与旧绳子大小相同 - rope._measurements.realCurveLength = rope.GetCurrentLength(); - rope._measurements.particleSpacing = _measurements.particleSpacing; - - var param = new OnSplitParams() - { - minParticleIndex = minIdx, - maxParticleIndex = maxIdx, - preSplitMeasurements = _measurements, - }; - - rope.SendMessage("OnRopeSplit", param, SendMessageOptions.DontRequireReceiver); - } - - return rope; - } - - /// - /// 在特定模拟粒子处分割绳子并返回新实例化游戏对象的绳子组件。确保 - /// 提供的数组正好有2个槽位。将向每个新创建的绳子发送Unity消息'OnRopeSplit(Rope.OnSplitParams)'。 - /// - /// 分割点的模拟粒子索引 - /// 如果不为null,一个正好有2个元素的数组,其中将返回新的绳子游戏对象 - public void SplitAt(int particleIndex, Rope2[] outNewRopes = null) - { - if (!Initialize() || (outNewRopes != null && outNewRopes.Length != 2) || wasSplit) - { - return; - } - - wasSplit = true; - - var fst = InstantiateSplitRope(0, particleIndex, name + "_split0"); - var snd = InstantiateSplitRope(particleIndex + 1, positions.Length - 1, name + "_split1"); - - Destroy(gameObject); - - if (outNewRopes != null) - { - outNewRopes[0] = fst; - outNewRopes[1] = snd; - } - } - - protected void ComputeRealCurve(Allocator allocator, out Measurements measurements, - out NativeArray points) - { - var localToWorld = (float4x4)transform.localToWorldMatrix; - - var spawnCurveLength = spawnPoints.GetLengthOfCurve(ref localToWorld); - var segmentCount = math.max(1, (int)(spawnCurveLength * simulation.resolution)); - var particleCount = segmentCount + 1; - var particleSpacing = spawnCurveLength / segmentCount; - - points = new NativeArray(particleCount, allocator); - spawnPoints.GetPointsAlongCurve(ref localToWorld, particleSpacing, points); - var realCurveLength = points.GetLengthOfCurve(ref localToWorld); - - measurements = new Measurements() - { - spawnCurveLength = spawnCurveLength, - realCurveLength = realCurveLength, - segmentCount = segmentCount, - particleCount = particleCount, - particleSpacing = particleSpacing, - }; - } - - public void OnEnable() - { - if (!initialized) - { - return; - } - - CompletePreviousSimulationFrame(); - } - - public void Start() - { - Initialize(); - } - - public void OnDisable() - { - if (!initialized) - { - return; - } - - CompletePreviousSimulationFrame(); - - simulationDisabledPrevFrame = true; - } - - public void OnDestroy() - { - if (!initialized) - { - return; - } - - CompletePreviousSimulationFrame(); - - // 状态 - positions.Dispose(); - prevPositions.Dispose(); - if (interpolatedPositions.IsCreated) - { - interpolatedPositions.Dispose(); - } - - bitangents.Dispose(); - massMultipliers.Dispose(); - - // 碰撞处理 - collisionPlanesActive.Dispose(); - collisionPlanes.Dispose(); - collisionRigidbodies = null; - - // 刚体连接 - particleTargets.Dispose(); - particleTargetFeedbacks.Dispose(); - - // 渲染 - vertices.Dispose(); - normals.Dispose(); - cosLookup.Dispose(); - sinLookup.Dispose(); - - Destroy(mesh); - } - - protected bool Initialize() - { - if (initialized) - { - return true; - } - - if (!Application.isPlaying || spawnPoints.Count < 2) - { - // 不适用于编辑模式执行 - return false; - } - - if (rendering.useSimpleLineRenderer) - { - lineRenderer = gameObject.GetComponent(); - if (lineRenderer == null) - { - lineRenderer = gameObject.AddComponent(); - } - - lineRenderer.useWorldSpace = true; - lineRenderer.loop = isLoop; - lineRenderer.widthMultiplier = rendering.simpleLineWidth; - lineRenderer.material = material; - lineRenderer.shadowCastingMode = shadowMode; - lineRenderer.receiveShadows = false; - lineRenderer.alignment = LineAlignment.View; - } - - // 状态 - ComputeRealCurve(Allocator.Persistent, out _measurements, out positions); - - prevPositions = new NativeArray(_measurements.particleCount, Allocator.Persistent); - positions.CopyTo(prevPositions); - if (interpolation != RopeInterpolation.None) - { - interpolatedPositions = new NativeArray(_measurements.particleCount, Allocator.Persistent); - positions.CopyTo(interpolatedPositions); - } - - bitangents = new NativeArray(_measurements.particleCount, Allocator.Persistent); - { - var up = new float3(0.0f, 1.0f, 0.0f); - - for (int i = 0; i < bitangents.Length; i++) - { - var tangent = positions[(i + 1) % bitangents.Length] - positions[i]; - - var bitangent = math.normalizesafe(math.cross(up, tangent)); - if (math.all(bitangent == float3.zero)) - { - bitangent = math.normalizesafe(math.cross(up + new float3(0.0f, 0.0f, -1.0f), tangent)); - } - - bitangents[i] = bitangent; - - up = math.cross(tangent, bitangent); - } - - if (!isLoop) - { - bitangents[bitangents.Length - 1] = bitangents[bitangents.Length - 2]; - } - } - - massMultipliers = new NativeArray(_measurements.particleCount, Allocator.Persistent); - for (int i = 0; i < massMultipliers.Length; i++) - { - massMultipliers[i] = 1.0f; - } - - // 碰撞处理 - collisionPlanesActive = new NativeArray(_measurements.particleCount, Allocator.Persistent); - collisionPlanes = - new NativeArray(_measurements.particleCount * MaxCollisionPlanesPerParticle, - Allocator.Persistent); - collisionRigidbodies = new Rigidbody[collisionPlanes.Length]; - - // 刚体连接 - queuedRigidbodyConnections = new List(); - liveRigidbodyConnections = new List(); - particleTargets = new NativeArray(InitialParticleTargets, Allocator.Persistent); - particleTargetFeedbacks = new NativeArray(InitialParticleTargets, Allocator.Persistent); - - // 渲染 - vertices = new NativeArray(_measurements.particleCount * radialVertices, Allocator.Persistent); - normals = new NativeArray(vertices.Length, Allocator.Persistent); - cosLookup = new NativeArray(radialVertices, Allocator.Persistent); - sinLookup = new NativeArray(radialVertices, Allocator.Persistent); - - for (int i = 0; i < radialVertices; i++) - { - var angle = ((float)i / (radialVertices - 1)) * Mathf.PI * 2.0f; - cosLookup[i] = Mathf.Cos(angle); - sinLookup[i] = Mathf.Sin(angle); - } - - // 注意,网格创建后三角形和uv保持不变 - var triangleParticleMax = isLoop ? _measurements.particleCount : _measurements.particleCount - 1; - var radialTriangleCount = triangleParticleMax * (radialVertices - 1) * 2 * 3; - var capTriangleCount = isLoop ? 0 : 2 * (radialVertices - 3) * 3; - var triangleCount = radialTriangleCount + capTriangleCount; - var triangles = new int[triangleCount]; - - int idx = 0; - for (int i = 0; i < triangleParticleMax; i++) - { - int vertexOffset0 = i * radialVertices; - int vertexOffset1 = ((i + 1) % _measurements.particleCount) * radialVertices; - - for (int j = 0; j < radialVertices - 1; j++) - { - int v0 = vertexOffset0 + j + 0; - int v1 = vertexOffset0 + j + 1; - int v2 = vertexOffset1 + j + 0; - int v3 = vertexOffset1 + j + 1; - - triangles[idx++] = v0; - triangles[idx++] = v1; - triangles[idx++] = v2; - triangles[idx++] = v2; - triangles[idx++] = v1; - triangles[idx++] = v3; - } - } - - if (!isLoop) - { - for (int i = 1; i < radialVertices - 2; i++) - { - triangles[idx++] = 0; - triangles[idx++] = i + 1; - triangles[idx++] = i; - } - - int vertexOffset = triangleParticleMax * radialVertices; - for (int i = 1; i < radialVertices - 2; i++) - { - triangles[idx++] = vertexOffset; - triangles[idx++] = vertexOffset + i; - triangles[idx++] = vertexOffset + i + 1; - } - } - - var uvs = new Vector2[vertices.Length]; - for (int i = 0; i < _measurements.particleCount; i++) - { - var uv = new Vector2 - { - x = ((float)i / (_measurements.particleCount - 1)) * _measurements.realCurveLength, - }; - - for (int j = 0; j < radialVertices; j++) - { - uv.y = (float)j / (radialVertices - 1); - uvs[i * radialVertices + j] = uv; - } - } - - mesh = new Mesh - { - name = gameObject.name + "_rope" - }; - mesh.MarkDynamic(); - mesh.SetVertices(vertices); - mesh.SetNormals(normals); - mesh.uv = uvs; - mesh.triangles = triangles; - - initialized = true; - computingSimulationFrame = false; - return true; - } - - protected Collider[] collisionQueryBuffer = new Collider[MaxCollisionPlanesPerParticle]; - - public void UpdateCollisionPlanes() - { - if (!collisions.enabled) - { - return; - } - - Profiler.BeginSample(nameof(UpdateCollisionPlanes)); - - var deltaTime = Time.fixedDeltaTime; - var layerMask = ~collisions.ignoreLayers; - var safeRadius = radius + collisions.collisionMargin; - var safeRadiusSq = safeRadius * safeRadius; - var extendedRadius = safeRadius * 1.5f; - - for (int i = 0; i < collisionPlanesActive.Length; i++) - { - if (i % collisions.stride != 0) - { - collisionPlanesActive[i] = 0; - for (int j = 0; j < MaxCollisionPlanesPerParticle; j++) - { - collisionRigidbodies[i * MaxCollisionPlanesPerParticle + j] = null; - } - - continue; - } - - var planeCount = 0; - - // 使用下一帧的投影位置 - var pos = positions[i]; - var prevPos = prevPositions[i]; - var vel = pos - prevPos; - prevPos = pos; - pos += vel; - - // 检查重叠 - var hitCount = - Physics.OverlapSphereNonAlloc(pos, extendedRadius, collisionQueryBuffer, - layerMask); // 使用稍大的球体来捕获更多碰撞 - for (int j = 0; j < hitCount && planeCount < MaxCollisionPlanesPerParticle; j++) - { - var collider = collisionQueryBuffer[j]; - var meshCollider = collider as MeshCollider; - - if (collider is BoxCollider || - collider is SphereCollider || - collider is CapsuleCollider || - (meshCollider != null && meshCollider.convex)) - { - var closestPoint = (float3)Physics.ClosestPoint(pos, collider, collider.transform.position, - collider.transform.rotation); - - var normal = math.normalizesafe(pos - closestPoint); - if (math.all(normal == float3.zero)) - { - continue; - } - - collisionPlanes[i * MaxCollisionPlanesPerParticle + planeCount] = new CollisionPlane() - { - point = closestPoint, - normal = normal, - velocityChange = collider.attachedRigidbody != null - ? (float3)collider.attachedRigidbody.GetPointVelocity(closestPoint) * deltaTime - : float3.zero, - }; - collisionRigidbodies[i * MaxCollisionPlanesPerParticle + planeCount] = - collider.attachedRigidbody; - planeCount++; - } - } - - // 检查快速移动 - if (planeCount < MaxCollisionPlanesPerParticle) - { - var movementSq = math.lengthsq(vel); - if (movementSq > safeRadiusSq) - { - if (Physics.Linecast(prevPos, pos, out RaycastHit hit, layerMask)) - { - collisionPlanes[i * MaxCollisionPlanesPerParticle + planeCount] = new CollisionPlane() - { - point = hit.point, - normal = hit.normal, - velocityChange = hit.rigidbody != null - ? (float3)hit.rigidbody.GetPointVelocity(hit.point) * deltaTime - : float3.zero, - }; - collisionRigidbodies[i * MaxCollisionPlanesPerParticle + planeCount] = hit.rigidbody; - planeCount++; - } - } - } - - collisionPlanesActive[i] = planeCount; - } - - Profiler.EndSample(); - } - - protected void PrepareRigidbodyConnections() - { - Profiler.BeginSample(nameof(PrepareRigidbodyConnections)); - - liveRigidbodyConnections.AddRange(queuedRigidbodyConnections); - queuedRigidbodyConnections.Clear(); - - if (liveRigidbodyConnections.Count > particleTargets.Length) - { - if (liveRigidbodyConnections.Count > MaxRigidbodyConnections) - { - Debug.LogWarning( - $"本帧遇到过多的活动刚体连接({liveRigidbodyConnections.Count})。" + - $"限制执行到最大值({MaxRigidbodyConnections})以避免性能下降..."); - } - else - { - var newCapacity = liveRigidbodyConnections.Count * 2; - - particleTargets.Dispose(); - particleTargets = new NativeArray(newCapacity, Allocator.Persistent); - particleTargetFeedbacks.Dispose(); - particleTargetFeedbacks = new NativeArray(newCapacity, Allocator.Persistent); - } - } - - for (int i = 0; i < particleTargets.Length; i++) - { - if (i < liveRigidbodyConnections.Count) - { - var c = liveRigidbodyConnections[i]; - - if (!c.rigidbody) - { - c.target.stiffness = 0.0f; - } - - particleTargets[i] = c.target; - - // 如果刚体是运动学的,则使粒子不可移动 - if (c.rigidbody && c.rigidbody.isKinematic) - { - massMultipliers[c.target.particleIndex] = 0.0f; - } - } - else - { - particleTargets[i] = new ParticleTarget() - { - particleIndex = -1, - }; - } - } - - Profiler.EndSample(); - } - - protected void ApplyRigidbodyFeedback() - { - Profiler.BeginSample(nameof(ApplyRigidbodyFeedback)); - - var particleMass = simulation.massPerMeter * _measurements.realCurveLength / _measurements.particleCount; - var invDtAndSim = 1.0f / (Time.fixedDeltaTime * simulation.substeps * simulation.solverIterations); - - // 碰撞 - if (collisions.enabled && collisions.influenceRigidbodies) - { - for (int i = 0; i < collisionPlanesActive.Length; i++) - { - if (i % collisions.stride != 0) - { - continue; - } - - int activePlaneCount = collisionPlanesActive[i]; - for (int j = 0; j < activePlaneCount; j++) - { - Rigidbody rb = collisionRigidbodies[i * MaxCollisionPlanesPerParticle + j]; - if (rb != null && !rb.isKinematic) - { - CollisionPlane plane = collisionPlanes[i * MaxCollisionPlanesPerParticle + j]; - float3 impulse = plane.feedback * (particleMass * invDtAndSim); - rb.ApplyImpulseNow(plane.point, impulse); - } - } - } - } - - // 连接 - if (liveRigidbodyConnections.Count > 0) - { - var iterationCount = math.min(liveRigidbodyConnections.Count, particleTargetFeedbacks.Length); - - for (int i = 0; i < iterationCount; i++) - { - var c = liveRigidbodyConnections[i]; - - // 应用冲量 - if (c.rigidbody) - { - float3 impulse = particleTargetFeedbacks[i] * (particleMass * invDtAndSim); - c.rigidbody.ApplyImpulseNow(c.target.position, impulse); - - if (c.rigidbodyDamping > 0.0f) - { - float3 normal = math.normalizesafe(impulse); - c.rigidbody.SetPointVelocityNow(c.target.position, normal, 0.0f, c.rigidbodyDamping); - } - } - - // 重置粒子质量倍增器(如果身体是运动学的可能已更改) - massMultipliers[c.target.particleIndex] = 1.0f; - } - - liveRigidbodyConnections.Clear(); - } - - Profiler.EndSample(); - } - - protected void ScheduleNextSimulationFrame() - { - Profiler.BeginSample(nameof(ScheduleNextSimulationFrame)); - - computingSimulationFrame = true; - - var gravity = simulation.useCustomGravity ? simulation.customGravity : (float3)Physics.gravity; - - var simulate = new SimulateJob() - { - deltaTime = Time.fixedDeltaTime, - externalAcceleration = gravity * simulation.gravityMultiplier, - energyKept = 1.0f - simulation.energyLoss, - - positions = positions, - prevPositions = prevPositions, - massMultipliers = massMultipliers, - - isLoop = isLoop, - substeps = simulation.substeps, - solverIterations = simulation.solverIterations, - stiffness = simulation.stiffness, - desiredSpacing = _measurements.particleSpacing * simulation.lengthMultiplier, - - collisionsEnabled = collisions.enabled, - radius = radius + collisions.collisionMargin, - friction = collisions.friction, - maxCollisionPlanesPerParticle = MaxCollisionPlanesPerParticle, - collisionPlanesActive = collisionPlanesActive, - collisionPlanes = collisionPlanes, - - particleTargets = particleTargets, - particleTargetFeedbacks = particleTargetFeedbacks, - }.Schedule(); - - if (interpolation == RopeInterpolation.None) - { - simulationFrameHandle = new OutputVerticesJob() - { - positions = positions, - bitangents = bitangents, - isLoop = isLoop, - radialVertices = radialVertices, - radius = radius, - cosLookup = cosLookup, - sinLookup = sinLookup, - vertices = vertices, - normals = normals, - }.Schedule(simulate); - } - else - { - // OutputVerticesJob必须在插值之后发生,而插值发生在Update()中,而不是FixedUpdate() - simulationFrameHandle = simulate; - } - - JobHandle.ScheduleBatchedJobs(); - - Profiler.EndSample(); - } - - protected void ScheduleInterpolation() - { - if (interpolation == RopeInterpolation.None) - { - return; - } - - CompletePreviousSimulationFrame(); - - Profiler.BeginSample(nameof(ScheduleInterpolation)); - - computingSimulationFrame = true; - - var invDt = 1.0f / Time.fixedDeltaTime; - - var handle = new JobHandle(); - - if (interpolation == RopeInterpolation.Interpolate) - { - handle = new InterpolatePositionsJob() - { - positions = positions, - prevPositions = prevPositions, - - invDeltaTime = invDt, - timeSinceFixedUpdate = timeSinceFixedUpdate, - - interpolatedPositions = interpolatedPositions, - }.Schedule(); - } - else - { - handle = new ExtrapolatePositionsJob() - { - positions = positions, - prevPositions = prevPositions, - - invDeltaTime = invDt, - timeSinceFixedUpdate = timeSinceFixedUpdate, - - interpolatedPositions = interpolatedPositions, - }.Schedule(); - } - - simulationFrameHandle = new OutputVerticesJob() - { - positions = interpolatedPositions, - bitangents = bitangents, - isLoop = isLoop, - radialVertices = radialVertices, - radius = radius, - cosLookup = cosLookup, - sinLookup = sinLookup, - vertices = vertices, - normals = normals, - }.Schedule(handle); - - JobHandle.ScheduleBatchedJobs(); - - Profiler.EndSample(); - } - - protected void CompletePreviousSimulationFrame() - { - if (!computingSimulationFrame) - { - return; - } - - Profiler.BeginSample(nameof(CompletePreviousSimulationFrame)); - - simulationFrameHandle.Complete(); - computingSimulationFrame = false; - - Profiler.EndSample(); - } - - protected static void FillMeshFrames(ref NativeArray positions, ref NativeArray bitangents, - Matrix4x4[] meshFrames, float spacing, bool isLoop, float rotationOffset, Vector3 scaleMultiplier, - bool stretch) - { - var scale = scaleMultiplier * 0.5f * spacing; - if (stretch) - { - scale.z = scaleMultiplier.z * 0.5f; - } - - var currentRotation = 0.0f; - for (var i = 0; i < positions.Length; i++) // 在这里使用positions数组,希望编译器能优化掉边界检查... - { - var tangent = Vector3.zero; - if (isLoop) - { - tangent = positions[(i + 1) % positions.Length] - positions[i]; - } - else - { - tangent = i < positions.Length - 1 - ? positions[i + 1] - positions[i] - : positions[i] - positions[i - 1]; - } - - var frameScale = stretch - ? new Vector3(scale.x, scale.y, scale.z * tangent.magnitude) - : scale; - tangent.Normalize(); - - var frameRotation = Quaternion.LookRotation(tangent, bitangents[i]) * - Quaternion.Euler(0.0f, 0.0f, currentRotation); - currentRotation += rotationOffset; - - customMeshFrames[i] = Matrix4x4.TRS(positions[i], frameRotation, frameScale); - } - } - - protected static Matrix4x4[] customMeshFrames; - - protected void SubmitToRenderer() - { - if (material == null) - { - return; - } - - Profiler.BeginSample(nameof(SubmitToRenderer)); - if (rendering.useSimpleLineRenderer) - { - // 使用简单线渲染 - if (lineRenderer != null && simulation.enabled) - { - lineRenderer.positionCount = positions.Length; - for (int i = 0; i < positions.Length; i++) - { - lineRenderer.SetPosition(i, positions[i]); - } - } - } - else - { - // 默认绳子圆柱体 - if (simulation.enabled) - { - mesh.SetVertices(vertices); - mesh.SetNormals(normals); - mesh.RecalculateBounds(); - } - - Graphics.DrawMesh(mesh, Matrix4x4.identity, material, gameObject.layer, null, 0, null, shadowMode); - } - - Profiler.EndSample(); - } - - public void FixedUpdate() - { - timeSinceFixedUpdate = 0.0f; - - if (!initialized) - { - return; - } - - if (!simulation.enabled) - { - simulationDisabledPrevFrame = true; - return; - } - - CompletePreviousSimulationFrame(); // 固定更新可能在每个渲染帧中运行多次 - - if (simulationDisabledPrevFrame) - { - queuedRigidbodyConnections.Clear(); - liveRigidbodyConnections.Clear(); - } - - simulationDisabledPrevFrame = false; - - transform.position = positions[0]; - - ApplyRigidbodyFeedback(); // 来自前一帧 - - UpdateCollisionPlanes(); - - PrepareRigidbodyConnections(); - - ScheduleNextSimulationFrame(); - } - - public void LateUpdate() - { - timeSinceFixedUpdate += Time.deltaTime; - - if (!initialized) - { - return; - } - - if (interpolation != RopeInterpolation.None) - { - ScheduleInterpolation(); - } - - CompletePreviousSimulationFrame(); - - SubmitToRenderer(); - } - -#if UNITY_EDITOR - public void OnDrawGizmos() - { - if (Application.isPlaying || spawnPoints.Count < 2 || !enabled) - { - return; - } - - ComputeRealCurve(Allocator.Temp, out Measurements measurements, out NativeArray points); - - Gizmos.color = Colors.ropeSegments; - for (int i = 0; i < points.Length - 1; i++) - { - Gizmos.DrawLine(points[i], points[i + 1]); - } - - if (isLoop && points.Length > 1) - { - Gizmos.DrawLine(points[points.Length - 1], points[0]); - } - - if (UnityEditor.Selection.Contains(gameObject)) - { - for (int i = 0; i < points.Length; i++) - { - if (collisions.enabled && i % collisions.stride == 0) - { - Gizmos.color = Colors.collisionParticle; - } - else - { - Gizmos.color = Colors.simulationParticle; - } - - Gizmos.DrawSphere(points[i], radius); - } - } - - points.Dispose(); - } - - public void OnDrawGizmosSelected() - { - if (!initialized) - { - return; - } - - var bounds = currentBounds; - Gizmos.color = Color.gray; - Gizmos.DrawWireCube(bounds.center, bounds.size); - } -#endif - - [BurstCompile] - private struct SimulateJob : IJob - { - [ReadOnly] public float deltaTime; - [ReadOnly] public float3 externalAcceleration; - [ReadOnly] public float energyKept; - - // 状态 - public NativeArray positions; - public NativeArray prevPositions; - [ReadOnly] public NativeArray massMultipliers; - - // 形状 - [ReadOnly] public bool isLoop; - [ReadOnly] public int substeps; - [ReadOnly] public int solverIterations; - [ReadOnly] public float stiffness; - [ReadOnly] public float desiredSpacing; - - // 碰撞处理 - [ReadOnly] public bool collisionsEnabled; - [ReadOnly] public float radius; - [ReadOnly] public float friction; - [ReadOnly] public int maxCollisionPlanesPerParticle; - [ReadOnly] public NativeArray collisionPlanesActive; - public NativeArray collisionPlanes; - - // 刚体附件 - [ReadOnly] public NativeArray particleTargets; - public NativeArray particleTargetFeedbacks; - - public void Execute() - { - // 准备模拟 - for (int i = 0; i < particleTargetFeedbacks.Length; i++) - { - particleTargetFeedbacks[i] = float3.zero; - } - - // 模拟 - float dt = deltaTime / substeps; - float invDt = 1.0f / dt; - bool forwardSolve = true; - - for (int substep = 0; substep < substeps; substep++) - { - for (int i = 0; i < positions.Length; i++) - { - if (massMultipliers[i] == 0.0f) - { - prevPositions[i] = positions[i]; - continue; - } - - var pos = positions[i]; - var prevPos = prevPositions[i]; - - var vel = (pos - prevPos) * invDt; - vel += externalAcceleration * dt; - vel *= energyKept; - - prevPositions[i] = pos; - positions[i] += vel * dt; - } - - for (int iter = 0; iter < solverIterations; iter++) - { - int loopCount = isLoop ? positions.Length : positions.Length - 1; - - // 应用杆约束 - if (forwardSolve) // 交替向前和向后求解以平衡误差 - { - for (int i = 0; i < loopCount; i++) - { - ApplyStickConstraint(i, (i + 1) % positions.Length); - } - } - else - { - for (int i = loopCount - 1; i >= 0; i--) - { - ApplyStickConstraint(i, (i + 1) % positions.Length); - } - } - - forwardSolve = !forwardSolve; - - // 应用碰撞约束 - if (collisionsEnabled) - { - for (int i = 0; i < positions.Length; i++) - { - for (int j = 0; j < collisionPlanesActive[i]; j++) - { - int planeIndex = i * maxCollisionPlanesPerParticle + j; - CollisionPlane plane = collisionPlanes[planeIndex]; - ApplyCollisionConstraint(i, ref plane); - collisionPlanes[planeIndex] = plane; - } - } - } - - // 应用刚体连接 - for (int i = 0; i < particleTargets.Length; i++) - { - var target = particleTargets[i]; - if (target.particleIndex == -1) - { - continue; - } - - var delta = (target.position - positions[target.particleIndex]) * target.stiffness; - positions[target.particleIndex] += delta; - particleTargetFeedbacks[i] -= delta * massMultipliers[target.particleIndex]; - } - } - } - } - - private void ApplyStickConstraint(int idx0, int idx1) - { - var delta = positions[idx0] - positions[idx1]; - var dist = math.length(delta); - if (dist > 0.0f) - { - delta /= dist; - } - else - { - delta = 0.0f; - } - - var correction = (dist - desiredSpacing) * stiffness; - - var w0 = massMultipliers[idx0]; - if (w0 > 0.0f) - { - w0 = 1.0f / w0; - } - - var w1 = massMultipliers[idx1]; - if (w1 > 0.0f) - { - w1 = 1.0f / w1; - } - - var invSumW = w0 + w1; - if (invSumW > 0.0f) - { - invSumW = 1.0f / invSumW; - } - - positions[idx0] -= delta * (correction * w0 * invSumW); - positions[idx1] += delta * (correction * w1 * invSumW); - } - - private void ApplyCollisionConstraint(int idx, ref CollisionPlane plane) - { - float dist = math.dot(positions[idx] - plane.point, plane.normal); - if (dist <= radius) - { - float depth = radius - dist; - float3 correction = plane.normal * depth; - positions[idx] += correction; - plane.feedback -= correction * massMultipliers[idx]; - - // 摩擦 - var delta = (positions[idx] - prevPositions[idx]) - plane.velocityChange; - var length = math.lengthsq(delta); - if (length > 0.0f) - { - length = math.sqrt(length); - delta /= length; - } - - prevPositions[idx] += delta * math.min(depth * friction, length); - } - } - } - - [BurstCompile] - private struct InterpolatePositionsJob : IJob - { - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray prevPositions; - - [ReadOnly] public float invDeltaTime; - [ReadOnly] public float timeSinceFixedUpdate; - - [WriteOnly] public NativeArray interpolatedPositions; - - public void Execute() - { - var scalar = timeSinceFixedUpdate * invDeltaTime; - - for (int i = 0; i < interpolatedPositions.Length; i++) - { - interpolatedPositions[i] = math.lerp(prevPositions[i], positions[i], scalar); - } - } - } - - [BurstCompile] - private struct ExtrapolatePositionsJob : IJob - { - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray prevPositions; - - [ReadOnly] public float invDeltaTime; - [ReadOnly] public float timeSinceFixedUpdate; - - [WriteOnly] public NativeArray interpolatedPositions; - - public void Execute() - { - for (int i = 0; i < interpolatedPositions.Length; i++) - { - var vel = (positions[i] - prevPositions[i]) * invDeltaTime; - - interpolatedPositions[i] = positions[i] + vel * timeSinceFixedUpdate; - } - } - } - - [BurstCompile] - private struct OutputVerticesJob : IJob - { - [ReadOnly] public NativeArray positions; - - public NativeArray bitangents; - - [ReadOnly] public bool isLoop; - [ReadOnly] public int radialVertices; - [ReadOnly] public float radius; - [ReadOnly] public NativeArray cosLookup; - [ReadOnly] public NativeArray sinLookup; - - [WriteOnly] public NativeArray vertices; - [WriteOnly] public NativeArray normals; - - public void Execute() - { - var last = positions.Length - 1; - - // 扩散双切线 - var smoothedBitangents = new NativeArray(bitangents.Length, Allocator.Temp); - - smoothedBitangents[0] = bitangents[0] + bitangents[1]; - if (isLoop) - { - smoothedBitangents[0] += bitangents[last]; - } - - for (int i = 1; i < bitangents.Length - 1; i++) - { - smoothedBitangents[i] = bitangents[i - 1] + bitangents[i] + bitangents[i + 1]; - } - - smoothedBitangents[last] = bitangents[last - 1] + bitangents[last]; - if (isLoop) - { - smoothedBitangents[last] += bitangents[0]; - } - - // 重新标准化双切线 - for (int i = 0; i < bitangents.Length; i++) - { - var tangent = positions[(i + 1) % positions.Length] - positions[i]; - var normal = math.cross(tangent, smoothedBitangents[i]); - - bitangents[i] = math.normalizesafe(math.cross(normal, tangent)); - } - - if (!isLoop) - { - bitangents[last] = bitangents[last - 1]; - } - - // 设置顶点 - for (int i = 0; i < positions.Length; i++) - { - var tangent = float3.zero; - if (isLoop) - { - tangent = positions[(i + 1) % positions.Length] - positions[i]; - } - else - { - tangent = i < last - ? positions[i + 1] - positions[i] - : positions[i] - positions[i - 1]; - } - - var bitangent = bitangents[i]; - var normal = math.normalizesafe(math.cross(tangent, bitangent)); - - for (int j = 0; j < radialVertices; j++) - { - float3 extent = bitangent * cosLookup[j] + normal * sinLookup[j]; - vertices[i * radialVertices + j] = positions[i] + extent * radius; - normals[i * radialVertices + j] = extent; - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/Rope/Rope2.cs.meta b/Assets/Scripts/ThirdParty/Rope/Rope2.cs.meta deleted file mode 100644 index a9c349ea1..000000000 --- a/Assets/Scripts/ThirdParty/Rope/Rope2.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 291103b05c314ad39c8a118ccc37871b -timeCreated: 1762270828 \ No newline at end of file diff --git a/Assets/Scripts/ThirdParty/Rope/RopeConnection.cs b/Assets/Scripts/ThirdParty/Rope/RopeConnection.cs deleted file mode 100644 index e23479f05..000000000 --- a/Assets/Scripts/ThirdParty/Rope/RopeConnection.cs +++ /dev/null @@ -1,242 +0,0 @@ -using UnityEngine; -using Unity.Mathematics; - -namespace NBF -{ - public enum RopeConnectionType : int - { - PinRopeToTransform = 0, - PinTransformToRope = 1, - PullRigidbodyToRope = 2, - TwoWayCouplingBetweenRigidbodyAndRope = 3, - } - - [RequireComponent(typeof(Rope))] - public class RopeConnection : MonoBehaviour - { - protected static readonly Color[] colors = new Color[4] - { - new Color(0.69f, 0.0f, 1.0f), // purple - new Color(1.0f, 0.0f, 0.0f), // red - new Color(1.0f, 0.0f, 0.0f), // red - new Color(1.0f, 1.0f, 0.0f), // yellow - }; - - [System.Serializable] - public struct RigidbodySettings - { - [Tooltip("The rigidbody to connect to")] - public Rigidbody body; - - [Tooltip("A measure of the stiffness of the connection. Lower values are usually more stable.")] - [Range(0.0f, 1.0f)] public float stiffness; - - [Tooltip("The amount of the rigidbody velocity to remove when the impulse is from the rope is applied to the rigidbody")] - [Range(0.0f, 1.0f)] public float damping; - } - - [System.Serializable] - public struct TransformSettings - { - [Tooltip("The transform to connect to")] - public Transform transform; - } - - [DisableInPlayMode] public RopeConnectionType type; - [DisableInPlayMode, Range(0.0f, 1.0f)] public float ropeLocation; - public bool autoFindRopeLocation = false; - - public RigidbodySettings rigidbodySettings = new RigidbodySettings() - { - stiffness = 0.1f, - damping = 0.1f, - }; - - public TransformSettings transformSettings = new TransformSettings() - {}; - - [Tooltip("The point in local object space to connect to")] - public float3 localConnectionPoint; - - protected Rope rope; - protected int particleIndex; - - public Component connectedObject - { - get - { - switch (type) - { - case RopeConnectionType.PinRopeToTransform: - case RopeConnectionType.PinTransformToRope: { - return transformSettings.transform; - } - case RopeConnectionType.PullRigidbodyToRope: - case RopeConnectionType.TwoWayCouplingBetweenRigidbodyAndRope: { - return rigidbodySettings.body; - } - default: { - return null; - } - } - } - } - - public float3 connectionPoint - { - get - { - var obj = connectedObject; - if (obj) - { - return obj.transform.TransformPoint(localConnectionPoint); - } - else - { - return float3.zero; - } - } - } - - public void Initialize(bool forceReset) - { - if (rope && !forceReset) - { - return; - } - - rope = GetComponent(); - Debug.Assert(rope); // required component! - - if (autoFindRopeLocation) - { - rope.GetClosestParticle(connectionPoint, out particleIndex, out float distance); - ropeLocation = rope.GetScalarDistanceAt(particleIndex); - } - else - { - var ropeDistance = ropeLocation * rope.measurements.realCurveLength; - particleIndex = rope.GetParticleIndexAt(ropeDistance); - } - } - - - public void OnDisable() - { - if (rope && type == RopeConnectionType.PinRopeToTransform) - { - rope.SetMassMultiplierAt(particleIndex, 1.0f); - } - } - - protected void EnforceConnection() - { - Initialize(false); - - if (!rope || !connectedObject) - { - return; - } - - switch (type) - { - case RopeConnectionType.PinRopeToTransform: - { - rope.SetMassMultiplierAt(particleIndex, 0.0f); - rope.SetPositionAt(particleIndex, connectionPoint); - break; - } - case RopeConnectionType.PinTransformToRope: - { - var target = rope.GetPositionAt(particleIndex, true); - var offset = (float3)(transformSettings.transform.TransformPoint(localConnectionPoint) - transformSettings.transform.position); - transformSettings.transform.position = target - offset; - break; - } - case RopeConnectionType.PullRigidbodyToRope: - { - var target = rope.GetPositionAt(particleIndex, false); - var current = connectionPoint; - var delta = target - current; - var dist = math.length(delta); - if (dist > 0.0f) - { - var normal = delta / dist; - var correctionVelocity = dist * rigidbodySettings.stiffness / Time.fixedDeltaTime; - rigidbodySettings.body.SetPointVelocityNow(current, normal, correctionVelocity, rigidbodySettings.damping); - } - break; - } - case RopeConnectionType.TwoWayCouplingBetweenRigidbodyAndRope: - { - rope.RegisterRigidbodyConnection( - particleIndex, - rigidbodySettings.body, - rigidbodySettings.damping, - connectionPoint, - rigidbodySettings.stiffness); - break; - } - } - } - - protected bool ShouldEnforceInFixedUpdate() - { - // Prefer FixedUpdate() whenever possible to avoid stalling while waiting for jobs to complete - bool isPhysics = - type != RopeConnectionType.PinRopeToTransform && - type != RopeConnectionType.PinTransformToRope; - - bool isInterpolating = rope && rope.interpolation != RopeInterpolation.None; - - return isPhysics || !isInterpolating; - } - - public void Update() - { - if (!ShouldEnforceInFixedUpdate()) - { - EnforceConnection(); - } - } - - public void FixedUpdate() - { - if (ShouldEnforceInFixedUpdate()) - { - EnforceConnection(); - } - } - -#if UNITY_EDITOR - public void OnDrawGizmos() - { - if (Application.isPlaying) - { - return; - } - var rope = GetComponent(); - if (!rope || rope.spawnPoints.Count < 2 || !connectedObject) - { - return; - } - - var objPoint = connectionPoint; - - Gizmos.color = colors[(int)type]; - - Gizmos.DrawWireCube(objPoint, Vector3.one * 0.05f); - - if (!autoFindRopeLocation) - { - var localToWorld = (float4x4)rope.transform.localToWorldMatrix; - var ropeLength = rope.spawnPoints.GetLengthOfCurve(ref localToWorld); - rope.spawnPoints.GetPointAlongCurve(ref localToWorld, ropeLength * ropeLocation, out float3 ropePoint); - - Gizmos.DrawWireCube(ropePoint, Vector3.one * 0.05f); - Gizmos.DrawLine(ropePoint, objPoint); - } - } -#endif - } -} diff --git a/Assets/Scripts/ThirdParty/Rope/RopeConnection.cs.meta b/Assets/Scripts/ThirdParty/Rope/RopeConnection.cs.meta deleted file mode 100644 index 4627813b2..000000000 --- a/Assets/Scripts/ThirdParty/Rope/RopeConnection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c7388c73173748148c4ba5f2ad6c713 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 36f78dd9e..62783192a 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -9,32 +9,32 @@ EditorUserSettings: value: 18134705175a055722080a3115371d4a0d55006876786860616b0471b8b07a68ffab74f9ee2a3a30300cea1a11320d0beb1a0c25f7060f494b4cc80018eb09361fc211cb1f862d19c51d19dcc413d6ade0d8ddfcddf9f4d9d29195fcfde6ebeae6f0a9c9afa6f8c5b89ff7a1aacececac4eba4d7c9d28bda flags: 0 RecentlyUsedSceneGuid-0: - value: 005203515d530f0308590875127b0844124e1d2c792b20607b7b4a6ae7b3666a - flags: 0 - RecentlyUsedSceneGuid-1: value: 565702035151590e5e0f547140745b44154f4a7a2f7c72657f2d4465e4e3676e flags: 0 - RecentlyUsedSceneGuid-2: + RecentlyUsedSceneGuid-1: value: 0150055704510808545c0a26467506444516197a747874637b7e1860b5b6616c flags: 0 - RecentlyUsedSceneGuid-3: + RecentlyUsedSceneGuid-2: value: 0757555551075f0e5e5e5c2647770e4414151e737f7823312c7f1f35e0b7643d flags: 0 - RecentlyUsedSceneGuid-4: + RecentlyUsedSceneGuid-3: value: 5752565e54545e5a0f575c2144770848444e1c7e287a7036752a1c6bbbb2606d flags: 0 - RecentlyUsedSceneGuid-5: + RecentlyUsedSceneGuid-4: value: 0705515f0650505f5457092744210e4440154a2c792c2434752f1862b6e6353e flags: 0 - RecentlyUsedSceneGuid-6: + RecentlyUsedSceneGuid-5: value: 5209500201030f0c5c5a547b48255d44444e1e7f7f7b22352c284462e1b13760 flags: 0 - RecentlyUsedSceneGuid-7: + RecentlyUsedSceneGuid-6: value: 0707505403515a0b555b557012715d444215197b747e206779281e67e0b6646d flags: 0 - RecentlyUsedSceneGuid-8: + RecentlyUsedSceneGuid-7: value: 5309035757065a0a54575f7216265c4444151d28792e72627d2f1935bbb8673a flags: 0 + RecentlyUsedSceneGuid-8: + value: 505203005253585d5e5d0f7515715a4447164e7d2e707e657a7c4863b7b2313d + flags: 0 RecentlyUsedSceneGuid-9: value: 5505015f5c515a085f5b092149760f441716407a787d7564287b1b36e7e1366e flags: 0