From 7c0df2aa1ec0805ba552b2ff962081c2e3322eba Mon Sep 17 00:00:00 2001 From: amamagi Date: Mon, 30 May 2022 18:22:08 +0900 Subject: [PATCH] small change --- .../Runtime/FastSpringBone/System/UpdateFastSpringBoneJob.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/VRM10/Runtime/FastSpringBone/System/UpdateFastSpringBoneJob.cs b/Assets/VRM10/Runtime/FastSpringBone/System/UpdateFastSpringBoneJob.cs index 19b6ead2f..5b3a5a61e 100644 --- a/Assets/VRM10/Runtime/FastSpringBone/System/UpdateFastSpringBoneJob.cs +++ b/Assets/VRM10/Runtime/FastSpringBone/System/UpdateFastSpringBoneJob.cs @@ -78,7 +78,8 @@ namespace UniVRM10.FastSpringBones.System var collider = Colliders[colliderIndex]; var colliderTransform = Transforms[collider.transformIndex + logic.transformIndexOffset]; var colliderScale = colliderTransform.localToWorldMatrix.lossyScale; - var maxColliderScale = math.max(math.max(math.max(colliderScale.x, colliderScale.y), colliderScale.z), 0); + var absColliderScale = math.abs(colliderScale); + var maxColliderScale = math.max(math.max(absColliderScale.x, absColliderScale.y), absColliderScale.z); var worldPosition = colliderTransform.localToWorldMatrix.MultiplyPoint3x4(collider.offset); var worldTail = colliderTransform.localToWorldMatrix.MultiplyPoint3x4(collider.tail);