-
Notifications
You must be signed in to change notification settings - Fork 102
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] Re-introduce springbone center #983
Conversation
Collision should be calculated in world space
An attempt to address the temporary github actions degradation See: actions/cache#811
@@ -197,8 +168,6 @@ export class VRMSpringBoneJoint { | |||
*/ | |||
public setInitState(): void { | |||
// remember initial position of itself | |||
this._centerSpacePosition.setFromMatrixPosition(this.bone.matrixWorld); |
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.
centerがVRMに含まれるようになったので最初に記録しておくことが不要となった。
.normalize() | ||
.multiplyScalar(this._centerSpaceBoneLength) | ||
.add(this._centerSpacePosition); | ||
_nextTail.sub(_worldSpacePosition).normalize().multiplyScalar(this._worldSpaceBoneLength).add(_worldSpacePosition); |
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.
worldSpaceに戻したのでworldSpacePositionを減算するようになった。
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.
見ました。
worldSpace、centerSpaceの変換大変ですね…。
Description
center
to the serialized SpringBone fields.center
is applied: