修改鱼线
This commit is contained in:
@@ -323,11 +323,10 @@ public class Rope : MonoBehaviour
|
||||
Simulate_VerletFast();
|
||||
|
||||
|
||||
LockAnchorsHard();
|
||||
|
||||
for (int it = 0; it < iterations; it++)
|
||||
{
|
||||
SolveDistanceConstraints_FABRIK();
|
||||
LockAnchorsHard();
|
||||
SolveDistanceConstraints_HeadOnly_Fast();
|
||||
}
|
||||
|
||||
LockAnchorsHard();
|
||||
@@ -353,7 +352,7 @@ public class Rope : MonoBehaviour
|
||||
// 水面抬升后补几次长度约束,让形状更顺一点
|
||||
for (int it = 0; it < waterPostConstraintIterations; it++)
|
||||
{
|
||||
SolveDistanceConstraints_FABRIK();
|
||||
SolveDistanceConstraints_HeadOnly_Fast();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -371,9 +370,9 @@ public class Rope : MonoBehaviour
|
||||
Vector3 e = _endTr.position;
|
||||
|
||||
_pCurr[0] = s;
|
||||
_pPrev[0] = s;
|
||||
_pCurr[last] = e;
|
||||
_pPrev[last] = e;
|
||||
// _pPrev[0] = s;
|
||||
// _pPrev[last] = e;
|
||||
|
||||
DrawHighResLine_Fast();
|
||||
}
|
||||
@@ -597,7 +596,7 @@ public class Rope : MonoBehaviour
|
||||
{
|
||||
_pCurr[i + 1] = b - corr; // 首段:node1 吃满
|
||||
}
|
||||
else if (!aLocked && bLocked)
|
||||
else if (!aLocked)
|
||||
{
|
||||
_pCurr[i] = a + corr; // 尾段:last-1 吃满
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user