-
Notifications
You must be signed in to change notification settings - Fork 110
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
[1.0] Various fixes related to spring bone #1002
Conversation
default gravityDir was (0.0, 1.0, 0.0) which is against the spec default (0.0, -1.0, 0.0) three-vrm-girlがgravityPowerがあるけどgravityDirがないパターンで(なぜ?)、この影響を受けた
…pace it should apply matrixWorldToCenter to _currentTail
…tead of center space
this.bone.localToWorld(this._currentTail.copy(this._initialLocalChildPosition)); | ||
const matrixWorldToCenter = this._getMatrixWorldToCenter(_matA); | ||
this.bone.localToWorld(this._currentTail.copy(this._initialLocalChildPosition)).applyMatrix4(matrixWorldToCenter); |
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.
✅ 座標系 : local => world => center
centerはSpringboneの揺れものの中心オブジェクト
gravityDir: new THREE.Vector3().fromArray(prevSchemaJoint.gravityDir ?? [0.0, 1.0, 0.0]), | ||
gravityDir: | ||
prevSchemaJoint.gravityDir != null | ||
? new THREE.Vector3().fromArray(prevSchemaJoint.gravityDir) | ||
: undefined, |
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.
デフォルト値の設定をここより下流でやっている意図が気になりました。
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.
どちらでも良いのですが、あえて言えば、Loaderを介さずにSpringBoneを扱う場合向けに VRMSpringBoneJoint
側でデフォルト値がセットされるようになっています。
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.
Loaderを介さずにSpringBoneを扱う場合向けに VRMSpringBoneJoint 側でデフォルト値がセットされるようになっています。
理解しました。
この実装で良いと思います。
Description
Each commit does different things:
Points need review