-
Notifications
You must be signed in to change notification settings - Fork 0
fix: アバターの位置元に戻した #208
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
base: main
Are you sure you want to change the base?
fix: アバターの位置元に戻した #208
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -318,7 +318,7 @@ export default function VRMAvatar({ | |||||||
| // 膝まで映るように上半身を中心に表示するようにオフセット(スケール後に調整) | ||||||||
| // モデルの膝の位置を計算して、膝から上が見えるように配置 | ||||||||
| const kneeOffset = size.y * 0.5; // モデルの高さの30%の位置(膝の位置) | ||||||||
| scene.position.y = -kneeOffset * (targetHeight / size.y) * 4 + 0.4; // 膝から上を画面に収める | ||||||||
| scene.position.y = -kneeOffset * (targetHeight / size.y) * 4; // 元に戻した | ||||||||
|
||||||||
| scene.position.y = -kneeOffset * (targetHeight / size.y) * 4; // 元に戻した | |
| // モデルの膝から上が見えるようにY座標をオフセットして、上半身を中心に表示する | |
| scene.position.y = -kneeOffset * (targetHeight / size.y) * 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment states "モデルの高さの30%の位置(膝の位置)" (30% of model height, knee position), but the calculation uses 0.5, which represents 50% of the model height. This inconsistency between the comment and code could lead to confusion during future maintenance. The comment should be updated to reflect the actual calculation.