Update Assets/VRM10/Runtime/Components/LookAt/CurveMapper.cs

Co-authored-by: 0b5vr <0b5vr@0b5vr.com>
This commit is contained in:
ousttrue 2024-10-11 16:10:49 +09:00 committed by GitHub
parent 6a02614d35
commit a335e375ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,7 +30,7 @@ namespace UniVRM10
public float Map(float src)
{
// https://github.com/vrm-c/UniVRM/issues/2452
var t = Mathf.Clamp01(Mathf.Clamp(src, 0, CurveXRangeDegree) / Mathf.Max(0.001f, CurveXRangeDegree));
var t = Mathf.Clamp01(src / Mathf.Max(0.001f, CurveXRangeDegree));
return t * CurveYRangeDegree;
}
}