Skip to content

Conversation

@cabanier
Copy link
Member

@cabanier cabanier commented Jan 24, 2024

@Maksims
Copy link

Maksims commented Jan 25, 2024

This is amazing!
I had to implement upper body IK multiple times, and it is not an easy task, and falls short when estimating shoulder twist.
Also legs! Yes please!

Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

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

As you said, this is just an FYI for now but I've got some comments for you anyway!

const material = new THREE.MeshLambertMaterial();

spheres = new THREE.InstancedMesh( geometry, material, body.size );
spheres.translateZ( -1 ).setRotationFromMatrix (new THREE.Matrix4().makeRotationY(Math.PI));
Copy link
Member

Choose a reason for hiding this comment

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

I'm not clear on how this works, and it's probably worth a comment for developers sake.

My guess is that this is a transform applied to the entire collection of instances spheres as a sort of root transform? If so, how does this result in the behavior in the video you linked, which appears to mirror your movements rather than show them rotated 180? (Although to be fair you never really moved your hands one at a time, so it's hard to tell. Full body movement suggests a mirror instead of a rotation, though.)

In any case, more comments throughout would be welcome!

matrix.identity();
}

matrix.setPosition( -position.x, position.y, position.z );
Copy link
Member

Choose a reason for hiding this comment

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

Oh, and I see that the positions are being inverted in X here too? Is THAT what causes the mirroring effect?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes :-)

@cabanier cabanier marked this pull request as ready for review June 18, 2025 22:34
if (!part.jointName.includes("hand")) {
scaledMatrix.makeScale(3, 3, 3);
} else {
- scaledMatrix.identity();
Copy link
Member

Choose a reason for hiding this comment

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

What's the - here? Typo or leftover from a merge? Does this code run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants