Skip to content
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

MMDPhysics: Use CapsuleGeometry. #24448

Merged
merged 1 commit into from
Aug 5, 2022
Merged

MMDPhysics: Use CapsuleGeometry. #24448

merged 1 commit into from
Aug 5, 2022

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 4, 2022

Related issue: -

Description

This PR ensures MMDPhysics makes use of CapsuleGeometry instead of generating a custom one.

@Mugen87 Mugen87 requested a review from takahirox August 4, 2022 08:48
upperSphere.updateMatrix();
lowerSphere.updateMatrix();

geometry.merge( upperSphere.geometry, upperSphere.matrix );
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This code was actually broken since a matrix is no valid argument. It has to be an integer. This bug broke the merge and thus the entire geometry generation.

I guess this issue was overlooked when Geometry was deprecated since BufferGeometry.merge() works differently than Geometry.merge().

Related #24443.

@Mugen87 Mugen87 added this to the r144 milestone Aug 4, 2022
Copy link
Collaborator

@takahirox takahirox left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

Honestly I don't remember why I made a custom geometry and didn't use CapsuleGeometry. I guess it didn't exist when I first implemented?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 5, 2022

Yes, CapsuleGeometry was added with r139 so far later than MMDLoader.

@Mugen87 Mugen87 merged commit d2e488d into mrdoob:dev Aug 5, 2022
@mrdoob
Copy link
Owner

mrdoob commented Aug 9, 2022

Thanks!

abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
snagy pushed a commit to snagy/three.js-1 that referenced this pull request Sep 21, 2022
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.

3 participants