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

Incorrect narrow_phase collisions after using ColliderSet::set_parent #742

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Vrixyz
Copy link
Contributor

@Vrixyz Vrixyz commented Sep 26, 2024

This PR adds 2 tests + the fix for the 2d scenario.

A workaround is done for 1st scenario, but it's not usable by users.

@@ -455,12 +455,34 @@ impl NarrowPhase {
}
}
}

// Remove the new parent from the collision graphs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
// Remove the new parent from the collision graphs
// Remove the new parent from the contact and intersection graphs

Also, shouldn´t we remove that from graph_indices too?

Comment on lines +1334 to +1336
/* Create collider 2. Parent it to rigid body 1. */
//let collider_2_handle =
// collider_set.insert_with_parent(collider.build(), body_2_handle, &mut rigid_body_set);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to remove

Comment on lines +1422 to +1423
// TODO: this is probably a way too big value to test, consider lowering it.
// In the meantime, this proves that current behaviour is incorrect.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

todo left here

Comment on lines +1268 to +1274
narrow_phase.add_pair(
&collider_set,
&ColliderPair {
collider1: collider_2_handle,
collider2: collider_1_handle,
},
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an internal api which we can't advocate for. a proper fix is still needed.

@Vrixyz Vrixyz marked this pull request as draft November 6, 2024 16:22
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.

1 participant