From 7f0255574c6d4e16b0105451e495a95495bfe299 Mon Sep 17 00:00:00 2001 From: "Bob.Song" Date: Thu, 26 Mar 2026 16:03:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/BobberTest.unity | 23 +++++++++++++++---- .../Fishing/New/View/Player/Tackle/FLine.cs | 6 +++++ Assets/Scripts/Test/BobberTest.cs | 20 +++++++++++++--- Assets/Water2.mat | 10 ++++---- .../Runtime/Materials/Water Volume.mat | 4 ++-- 5 files changed, 48 insertions(+), 15 deletions(-) diff --git a/Assets/Scenes/BobberTest.unity b/Assets/Scenes/BobberTest.unity index f84962970..fba41b00f 100644 --- a/Assets/Scenes/BobberTest.unity +++ b/Assets/Scenes/BobberTest.unity @@ -1067,7 +1067,7 @@ GameObject: - component: {fileID: 909052972} - component: {fileID: 909052971} - component: {fileID: 909052970} - m_Layer: 0 + m_Layer: 3 m_Name: Terrain m_TagString: Untagged m_Icon: {fileID: 0} @@ -1143,7 +1143,7 @@ Transform: m_GameObject: {fileID: 909052969} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -53, y: -1.75, z: -55.52} + m_LocalPosition: {x: -53, y: -0.5, z: -55.52} m_LocalScale: {x: 100, y: 100, z: 100} m_ConstrainProportionsScale: 0 m_Children: [] @@ -2177,8 +2177,9 @@ MonoBehaviour: m_EditorClassIdentifier: Assembly-CSharp::Test.BobberTest rb: {fileID: 1518432885} line: {fileID: 6434087796225375415} - lineLength: 3 - floatLength: 1 + Terrain: {fileID: 909052972} + lineLength: 4 + floatLength: 1.5 Tension: 0 --- !u!1 &1529912227 GameObject: @@ -5184,6 +5185,10 @@ PrefabInstance: propertyPath: m_Name value: PostProcessing objectReference: {fileID: 0} + - target: {fileID: 6079220456006713144, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3} propertyPath: m_LocalPosition.x value: 0 @@ -6102,6 +6107,8 @@ MonoBehaviour: waterSampleStep: 2 waterInterpolate: 1 waterUpdateEvery: 1 + waterLiftStrength: 0.25 + keepStartAdjacentNodeFollow: 1 waterPostConstraintIterations: 2 renderSubdivisionsIdle: 6 renderSubdivisionsMoving: 2 @@ -6154,6 +6161,8 @@ MonoBehaviour: waterSampleStep: 2 waterInterpolate: 1 waterUpdateEvery: 1 + waterLiftStrength: 0.25 + keepStartAdjacentNodeFollow: 1 waterPostConstraintIterations: 2 renderSubdivisionsIdle: 6 renderSubdivisionsMoving: 2 @@ -6814,7 +6823,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!222 &7490067230206654995 CanvasRenderer: m_ObjectHideFlags: 0 @@ -7161,6 +7170,8 @@ MonoBehaviour: waterSampleStep: 2 waterInterpolate: 1 waterUpdateEvery: 1 + waterLiftStrength: 0.25 + keepStartAdjacentNodeFollow: 1 waterPostConstraintIterations: 2 renderSubdivisionsIdle: 6 renderSubdivisionsMoving: 2 @@ -7213,6 +7224,8 @@ MonoBehaviour: waterSampleStep: 2 waterInterpolate: 1 waterUpdateEvery: 1 + waterLiftStrength: 0.25 + keepStartAdjacentNodeFollow: 1 waterPostConstraintIterations: 2 renderSubdivisionsIdle: 6 renderSubdivisionsMoving: 2 diff --git a/Assets/Scripts/Fishing/New/View/Player/Tackle/FLine.cs b/Assets/Scripts/Fishing/New/View/Player/Tackle/FLine.cs index c9dfd2a0f..c2b0d299a 100644 --- a/Assets/Scripts/Fishing/New/View/Player/Tackle/FLine.cs +++ b/Assets/Scripts/Fishing/New/View/Player/Tackle/FLine.cs @@ -123,5 +123,11 @@ namespace NBF } fishingRope.SetTargetLength(value); } + + public void SetLureLength(float value) + { + Log.Error($"SetObiRopeStretch={value}"); + bobberRope.SetTargetLength(value); + } } } \ No newline at end of file diff --git a/Assets/Scripts/Test/BobberTest.cs b/Assets/Scripts/Test/BobberTest.cs index bc5d2375b..264fcf590 100644 --- a/Assets/Scripts/Test/BobberTest.cs +++ b/Assets/Scripts/Test/BobberTest.cs @@ -1,4 +1,5 @@ using System; +using DG.Tweening; using NBF; using UnityEngine; @@ -9,10 +10,13 @@ namespace Test public Rigidbody rb; public FLine line; + public Transform Terrain; + public float lineLength = 1f; public float floatLength = 0.5f; public float Tension = 0; + public void Start() { line.InitTest(rb); @@ -20,8 +24,9 @@ namespace Test line.Lure.SetJointDistance(floatLength); line.Bobber.SetJointDistance(lineLength - floatLength); line.SetTargetLength(lineLength - floatLength); + line.SetLureLength(floatLength); } - + private void Update() { if (Input.GetKeyDown(KeyCode.Alpha0)) @@ -38,8 +43,18 @@ namespace Test lineLength -= 0.1f; SetLineLength(lineLength); } + else if (Input.GetKeyDown(KeyCode.K)) + { + var pos = Terrain.localPosition; + Terrain.DOLocalMoveY(pos.y - 0.02f, 0.2f); + } + else if (Input.GetKeyDown(KeyCode.L)) + { + var pos = Terrain.localPosition; + Terrain.DOLocalMoveY(pos.y + 0.02f, 0.2f); + } } - + public void SetLineLength(float lineLength, bool stretchRope = true) { Debug.Log($"lineLength={lineLength}"); @@ -64,6 +79,5 @@ namespace Test } } } - } } \ No newline at end of file diff --git a/Assets/Water2.mat b/Assets/Water2.mat index 8d268b71a..b3d32a46a 100644 --- a/Assets/Water2.mat +++ b/Assets/Water2.mat @@ -131,7 +131,7 @@ Material: - _Crest_CausticsDepthOfField: 6 - _Crest_CausticsDistortionScale: 250 - _Crest_CausticsDistortionStrength: 0.16 - - _Crest_CausticsEnabled: 1 + - _Crest_CausticsEnabled: 0 - _Crest_CausticsFocalDepth: 2 - _Crest_CausticsMotionBlur: 1 - _Crest_CausticsScrollSpeed: 1 @@ -139,7 +139,7 @@ Material: - _Crest_CausticsTextureAverage: 0.07 - _Crest_CausticsTextureScale: 50 - _Crest_DirectTerm: 1 - - _Crest_FoamEnabled: 1 + - _Crest_FoamEnabled: 0 - _Crest_FoamFeather: 0.75 - _Crest_FoamIntensityAlbedo: 1 - _Crest_FoamNormalStrength: 1 @@ -147,7 +147,7 @@ Material: - _Crest_FoamScrollSpeed: 1 - _Crest_FoamSmoothness: 0.7 - _Crest_MinimumReflectionDirectionY: 0.03 - - _Crest_NormalMapEnabled: 1 + - _Crest_NormalMapEnabled: 0 - _Crest_NormalMapScale: 3 - _Crest_NormalMapScrollSpeed: 1 - _Crest_NormalMapStrength: 0.15 @@ -234,8 +234,8 @@ Material: - _ZWrite: 1 - _ZWriteControl: 1 m_Colors: - - _Crest_Absorption: {r: 0.70086163, g: 0.236999, b: 0.106051564, a: 1} - - _Crest_AbsorptionColor: {r: 0.34162676, g: 0.6954546, b: 0.85, a: 0.1019608} + - _Crest_Absorption: {r: 6.0101995, g: 6.0101995, b: 6.0101995, a: 1} + - _Crest_AbsorptionColor: {r: 0, g: 0, b: 0, a: 0.1019608} - _Crest_Scattering: {r: 0, g: 0.09803919, b: 0.19999996, a: 1} - _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0} - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat b/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat index 8ec8d0d9c..50a2c70f3 100644 --- a/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat @@ -56,7 +56,7 @@ Material: - _Crest_CausticsDepthOfField: 6 - _Crest_CausticsDistortionScale: 250 - _Crest_CausticsDistortionStrength: 0.16 - - _Crest_CausticsEnabled: 1 + - _Crest_CausticsEnabled: 0 - _Crest_CausticsFocalDepth: 2 - _Crest_CausticsMotionBlur: 1 - _Crest_CausticsScrollSpeed: 1 @@ -71,7 +71,7 @@ Material: - _Crest_ShadowsAffectsAmbientFactor: 0.5 - _Crest_SunBoost: 2 m_Colors: - - _Crest_AbsorptionColor: {r: 0.34162676, g: 0.6954546, b: 0.85, a: 0.1019608} + - _Crest_AbsorptionColor: {r: 0, g: 0, b: 0, a: 0.1019608} - _Crest_Scattering: {r: 0, g: 0.09803919, b: 0.19999996, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1