动态水物理

This commit is contained in:
2026-03-22 18:49:00 +08:00
parent 21c8775b58
commit 90dd86f399
154 changed files with 225 additions and 314 deletions

View File

@@ -266,15 +266,4 @@ public class CapsuleBuoyancyStable : MonoBehaviour
a = center - half;
b = center + half;
}
void OnDrawGizmosSelected()
{
if (!drawDebug) return;
if (_rb == null) _rb = GetComponent<Rigidbody>();
Vector3 centerOfMassWorld = transform.TransformPoint(_rb != null ? _rb.centerOfMass : Vector3.zero);
Gizmos.color = Color.cyan;
Gizmos.DrawSphere(centerOfMassWorld, 0.1f);
Gizmos.DrawLine(centerOfMassWorld, centerOfMassWorld + Vector3.up * 0.5f);
}
}