修改水

This commit is contained in:
2026-01-01 22:00:33 +08:00
parent 040a222bd6
commit 9ceffccd39
1800 changed files with 103929 additions and 139495 deletions

View File

@@ -39,9 +39,7 @@ namespace Obi
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float4 DifferentiateAngular(quaternion rotation, quaternion prevRotation, float dt)
{
quaternion deltaq = math.mul(rotation, math.inverse(prevRotation));
float sign = deltaq.value.w >= 0 ? 1 : -1;
return new float4(sign * deltaq.value.xyz * 2.0f / dt, 0);
return new float4((math.mul(rotation, math.inverse(prevRotation)).value * 2.0f / dt).xyz, 0);
}
}
}