修改rope脚本

This commit is contained in:
Bob.Song
2025-11-05 15:46:53 +08:00
parent 6ccd2e16bd
commit 3e739facde
10 changed files with 1382 additions and 180 deletions

View File

@@ -119,23 +119,7 @@ namespace NBF
particleIndex = rope.GetParticleIndexAt(ropeDistance);
}
}
public void OnRopeSplit(Rope.OnSplitParams p)
{
if (autoFindRopeLocation)
{
// There is no way to determine which side of the split this component was located, just remove it...
Destroy(this);
}
else
{
var idx = p.preSplitMeasurements.GetParticleIndexAt(ropeLocation * p.preSplitMeasurements.realCurveLength);
if (idx < p.minParticleIndex || idx > p.maxParticleIndex)
{
Destroy(this);
}
}
}
public void OnDisable()
{