升级obi

This commit is contained in:
2026-01-22 22:08:21 +08:00
parent 120b8cda26
commit 20f14322bc
1067 changed files with 149894 additions and 29583 deletions

View File

@@ -32,7 +32,7 @@ namespace Obi
m_ConstraintCount = count;
}
public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps)
public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft)
{
var projectConstraints = new BendTwistConstraintsBatchJob()
{
@@ -107,12 +107,11 @@ namespace Obi
quaternion omega_plus;
omega_plus.value = omega.value + rest.value; //delta Omega with - omega_0
omega.value -= rest.value; //delta Omega with + omega_0
if (math.lengthsq(omega.value) > math.lengthsq(omega_plus.value))
omega = omega_plus;
// plasticity
if (math.lengthsq(omega.value) > plasticity[i].x * plasticity[i].x)
if (math.lengthsq(omega.value.xyz) > plasticity[i].x * plasticity[i].x)
{
rest.value += omega.value * plasticity[i].y * deltaTime;
restDarboux[i] = rest;