From a54c11c7c938eed98ffdb6bc275ba60fbf1d4e1e Mon Sep 17 00:00:00 2001 From: ono-at-live2d-com Date: Mon, 13 May 2019 10:39:38 +0900 Subject: [PATCH] Fixed the bug that Physics results in incorrect when the input value is out of the range of Parameter. --- Framework/physics/cubismphysics.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Framework/physics/cubismphysics.ts b/Framework/physics/cubismphysics.ts index 3f30c32..f295c4b 100644 --- a/Framework/physics/cubismphysics.ts +++ b/Framework/physics/cubismphysics.ts @@ -762,14 +762,14 @@ export namespace Live2DCubismFramework if(maxValue < value) { - return result; + value = maxValue; } const minValue: number = CubismMath.min(parameterMaximum, parameterMinimum); if(minValue > value) { - return result; + value = minValue; } const minNormValue: number = CubismMath.min(normalizedMinimum, normalizedMaximum);