修改rope脚本
This commit is contained in:
18
Assets/Scripts/ThirdParty/Rope/RopeConnection.cs
vendored
18
Assets/Scripts/ThirdParty/Rope/RopeConnection.cs
vendored
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user