Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lookat] inputMaxValue == 0 の例外処理 #2455

Merged
merged 9 commits into from
Oct 11, 2024

Conversation

ousttrue
Copy link
Contributor

@ousttrue ousttrue commented Oct 7, 2024

fixed #2452

@ousttrue ousttrue added the LookAt/FirstPerson create headless model for VR label Oct 7, 2024
@ousttrue ousttrue requested a review from 0b5vr October 7, 2024 05:52
@@ -9,8 +7,6 @@ namespace UniVRM10
[Serializable]
public class CurveMapper
{
private AnimationCurve _curve = AnimationCurve.Linear(0, 0, 1.0f, 1.0f);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.0 ではカーブを使わなくなりました。
入力値と同じ値を出力する linear 設定になっています。

}
return Curve.Evaluate(src / CurveXRangeDegree) * CurveYRangeDegree;
// https://github.com/vrm-c/UniVRM/issues/2452
var t = Mathf.Clamp01(Mathf.Clamp(src, 0, 1) / MathF.Max(CurveXRangeDegree, 0.001f));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var t = Mathf.Clamp01(Mathf.Clamp(src, 0, 1) / MathF.Max(CurveXRangeDegree, 0.001f));
var t = Mathf.Clamp01(src / MathF.Max(CurveXRangeDegree, 0.001f));

@ousttrue
Copy link
Contributor Author

ousttrue commented Oct 7, 2024

中止

@ousttrue ousttrue closed this Oct 7, 2024
@ousttrue ousttrue reopened this Oct 11, 2024
Co-authored-by: 0b5vr <0b5vr@0b5vr.com>
@ousttrue ousttrue merged commit 4055adc into vrm-c:master Oct 11, 2024
1 check passed
@ousttrue ousttrue deleted the fix/inputMaxValue branch October 11, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LookAt/FirstPerson create headless model for VR Non breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LookAtのinputMaxValueが0の場合の挙動の修正
2 participants