From b3dc6b45fae8f66f4bf1220fb57451e33249bd86 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 29 Nov 2024 14:36:26 +0900 Subject: [PATCH] fix stiffness. normalized --- .../ClothWarp/Runtime/Components/ClothWarpRuntimeProvider.cs | 2 +- .../ClothSample/ClothWarp/Runtime/Jobs/Particle.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRuntimeProvider.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRuntimeProvider.cs index c9f2e4a3a..31116a6a6 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRuntimeProvider.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRuntimeProvider.cs @@ -70,7 +70,7 @@ namespace UniVRM10.ClothWarp.Components var joint = joints[i]; // mod ? - var stiffness = joint.m_stiffnessForce * 6; + var stiffness = joint.m_stiffnessForce; var settings = new UniGLTF.SpringBoneJobs.Blittables.BlittableJointMutable { diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Jobs/Particle.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Jobs/Particle.cs index 97da47f3b..1d068f31e 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Jobs/Particle.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Jobs/Particle.cs @@ -86,7 +86,7 @@ namespace UniVRM10.ClothWarp.Jobs var parentParentRotation = CurrentTransforms[parent.ParentIndex].Rotation; var velocity = (CurrentPositions[particleIndex] - PrevPositions[particleIndex]) * (1.0f - particle.Settings.dragForce); - var resilience = parentParentRotation * parent.InitLocalRotation * particle.InitLocalPosition * + var resilience = parentParentRotation * parent.InitLocalRotation * particle.InitLocalPosition.normalized * particle.Settings.stiffnessForce; var external = particle.Settings.gravityDir * particle.Settings.gravityPower + Frame.Force;