Skip to content

[SpringboneLimit] gizmo 仕様合わせ#2727

Merged
ousttrue merged 12 commits intovrm-c:masterfrom
ousttrue:fix/springbone_limit
Oct 2, 2025
Merged

[SpringboneLimit] gizmo 仕様合わせ#2727
ousttrue merged 12 commits intovrm-c:masterfrom
ousttrue:fix/springbone_limit

Conversation

@ousttrue
Copy link
Contributor

@ousttrue ousttrue commented Sep 17, 2025

  • gizmo と動作のずれを検証して、 ロジックを修正した。( 角度を 0.5 倍 ) => gizmo の方を修正
  • 変数名、
    • m_angleLimitRotation => m_limitSpaceOffset
    • m_angleLimitAngle1 => m_phi => m_pitch
    • m_angleLimitAngle2 => m_theta => m_yaw
  • phi, theta pitch, yaw(Sphericalの第2角度) が見た目に分かるように gizmo を増やした
  • theta の値域 pi/2。初期値 0

spherical

  • TODO: vrm-specification の submodule を前進させるべし(後で)

@ousttrue
Copy link
Contributor Author

fold_ui

@ousttrue ousttrue changed the title [SpringboneLimit] 細部 [WIP][SpringboneLimit] 細部 Sep 17, 2025
@ousttrue
Copy link
Contributor Author

vrm-c/vrm-specification#496

仕様誤解。修正中・・・

@ousttrue ousttrue changed the title [WIP][SpringboneLimit] 細部 [SpringboneLimit] gizmo 仕様合わせ Sep 17, 2025
@ousttrue
Copy link
Contributor Author

fix_gizmo

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR aligns SpringBone limit functionality with gizmo specifications by updating angle calculations and variable naming conventions. The changes ensure consistent behavior between the visual gizmo representation and the underlying logic.

  • Updated angle calculation logic by halving angle values (0.5 multiplier)
  • Renamed variables for clarity: m_angleLimitRotation → m_limitSpaceOffset, m_angleLimitAngle1 → m_phi, m_angleLimitAngle2 → m_theta
  • Enhanced gizmo visualization with improved phi/theta angle displays and updated theta range to pi/2 with initial value 0

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
Vrm10Importer.cs Updates field assignments to use new variable names during SpringBone import
Vrm10Exporter.cs Updates field references to use new variable names during SpringBone export
VRM10SpringBoneJoint.cs Renames member variables and updates theta range constraint
VRM10SpringBoneJointEditor.cs Updates editor to use new variable names and enhances gizmo visualization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ousttrue
Copy link
Contributor Author

ousttrue commented Sep 18, 2025

Copy link
Contributor

@notargs notargs left a comment

Choose a reason for hiding this comment

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

LGTM!

private SerializedProperty m_angleLimitAngle1;
private SerializedProperty m_angleLimitAngle2;
private SerializedProperty m_angleLimitPitch;
private SerializedProperty m_angleLimitYaw;
Copy link
Contributor

Choose a reason for hiding this comment

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

わかりやすくなった 👍

}
}

static void DrawSpace(Matrix4x4 limitSpace, float size)
Copy link
Contributor

Choose a reason for hiding this comment

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

ナイス関数化 👍
[質問]ここでいう Space は何を指していますか?

);
}

private static void DrawSpherical(in Vector3 limit_tail_pos, float pitch, float yaw)
Copy link
Contributor

Choose a reason for hiding this comment

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

ナイス関数化 👍

@ousttrue ousttrue merged commit de05f99 into vrm-c:master Oct 2, 2025
1 check passed
@ousttrue ousttrue deleted the fix/springbone_limit branch October 2, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments