From 1a113dbd258639a0981eb903a4c97878ffa618f5 Mon Sep 17 00:00:00 2001
From: Ding Yuntian <1491671119@qq.com>
Date: Thu, 16 Jul 2026 23:05:46 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E5=86=B2=E7=AA=81=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=BA=BF=E7=BC=86?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Assets/Scripts/FixSystemNew/Cable/Plug.cs | 1 -
.../Screen System/FixPanel/CablePanel.cs | 49 +------------------
2 files changed, 1 insertion(+), 49 deletions(-)
diff --git a/Assets/Scripts/FixSystemNew/Cable/Plug.cs b/Assets/Scripts/FixSystemNew/Cable/Plug.cs
index 92a944426..0458596f3 100644
--- a/Assets/Scripts/FixSystemNew/Cable/Plug.cs
+++ b/Assets/Scripts/FixSystemNew/Cable/Plug.cs
@@ -268,7 +268,6 @@ namespace AibisDream.FixSystem
{
var pointerWorldPos = CameraKit.GetMouseWorldPos(pointerData.position);
cablePanel.UpdateDragPointer(pointerWorldPos);
- cablePanel.UpdateDragProximity(pointerWorldPos);
}
}
diff --git a/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanel.cs b/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanel.cs
index 91fc65383..c3c32894c 100644
--- a/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanel.cs
+++ b/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanel.cs
@@ -21,9 +21,6 @@ namespace AibisDream.FixSystem
[Header("灯光系统")]
[SerializeField] private CablePanelLight panelLight;
- [Header("拖拽手感")]
- [SerializeField] private float dragAssistRangeMultiplier = 1.65f;
-
public Plug PlugRef => plugRef;
public Cable CableRef => cableRef;
public PhysicCable PhysicCableRef => physicCableRef;
@@ -271,27 +268,7 @@ namespace AibisDream.FixSystem
physicCableRef.SetPointer(pointerWorldPos);
}
- /// 拖拽中根据与模块距离设置/清除线缆吸附目标;不控制插孔盖开合。
- public void UpdateDragProximity(Vector3 pointerWorldPos)
- {
- if (physicCableRef == null || BodyModuleSystem?.BodyModules == null)
- {
- return;
- }
-
- float snapRange = BodyModuleSystem.plugSnappingRange;
- float assistRange = Mathf.Max(snapRange, snapRange * dragAssistRangeMultiplier);
- if (TryFindClosestModuleWithin(pointerWorldPos, assistRange, out var targetModule))
- {
- physicCableRef.SetDragAssistTarget(targetModule.GetSocketPos(), assistRange);
- }
- else
- {
- physicCableRef.ClearDragAssistTarget();
- }
- }
-
- /// 结束拖拽:清除吸附并关闭所有插孔盖。
+ /// 结束拖拽:关闭所有插孔盖。
public void ClearDragHighlight()
{
BodyModuleSystem?.CloseModuleSlots(null);
@@ -323,30 +300,6 @@ namespace AibisDream.FixSystem
return BodyModuleSystem.TryFindClosestModule(sourcePos, out targetModule);
}
- private bool TryFindClosestModuleWithin(Vector3 sourcePos, float range, out BodyModule targetModule)
- {
- float closestDistance = Mathf.Infinity;
- BodyModule closestModule = null;
-
- foreach (var bodyModule in BodyModuleSystem.BodyModules)
- {
- if (bodyModule == null || !bodyModule.gameObject.activeInHierarchy || !bodyModule.IsAvailable())
- {
- continue;
- }
-
- float distance = Vector3.Distance(sourcePos, bodyModule.GetSocketPos().position);
- if (distance < closestDistance)
- {
- closestDistance = distance;
- closestModule = bodyModule;
- }
- }
-
- targetModule = closestDistance <= range ? closestModule : null;
- return targetModule != null;
- }
-
public void PullUpCable()
{
if (isCableRetracted) return;