-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
base: master
Are you sure you want to change the base?
Conversation
…be should be removed from graph_indices too?
@@ -455,12 +455,34 @@ impl NarrowPhase { | |||
} | |||
} | |||
} | |||
|
|||
// Remove the new parent from the collision graphs |
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.
// 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?
/* 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); |
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.
to remove
// TODO: this is probably a way too big value to test, consider lowering it. | ||
// In the meantime, this proves that current behaviour is incorrect. |
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.
todo left here
narrow_phase.add_pair( | ||
&collider_set, | ||
&ColliderPair { | ||
collider1: collider_2_handle, | ||
collider2: collider_1_handle, | ||
}, | ||
); |
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.
This is an internal api which we can't advocate for. a proper fix is still needed.
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.