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

Set Bullet collision shape index to zero when using a single shape or ConcavePolygonShape #42881

Merged
merged 1 commit into from
Dec 28, 2020

Conversation

madmiraal
Copy link
Contributor

Fixes #39767 and documents that Bullet physics is unable to detect the shape index when colliding with a ConcavePolygonShape.

@pouleyKetchoupp
Copy link
Contributor

Can you make it a thing to at least mention the person you're using the code from when you make a PR? It's not the first time it happens, and it would help with tracking things and reviewing (see #42574 and #39084).
In some cases, co-authoring would be even better to also give proper credits.

About this PR:
I think it's ok to make this change, but a few more things are needed:
1.It should be possible to detect the case where there are several ConcavePolygonShape in the rigid body and trigger a warning once to indicate indices might be wrong.
2.An issue ticket needs to be opened upstream, since it's an actual issue in Bullet.

Copy link
Contributor

@pouleyKetchoupp pouleyKetchoupp left a comment

Choose a reason for hiding this comment

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

Added some comments for a few details.

modules/bullet/space_bullet.cpp Show resolved Hide resolved
doc/classes/RigidBody3D.xml Outdated Show resolved Hide resolved
doc/classes/RigidBody3D.xml Outdated Show resolved Hide resolved
Copy link
Contributor

@AndreaCatania AndreaCatania left a comment

Choose a reason for hiding this comment

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

It looks nice.

@madmiraal madmiraal force-pushed the fix-39767 branch 3 times, most recently from 660e05b to 7332c67 Compare October 18, 2020 12:36
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

body_shape_entered yields extraneous shape indices on rigidbodies with only one shape (RigidBody with Bullet)
4 participants