-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Broad phase pair filters cannot access body information #273
Comments
I investigated having nphysics define its own I suspect the best approach would be to modify the pub trait BroadPhasePairFilter<N: RealField, Object, Handle, Set>: Any + Send + Sync {
fn is_pair_valid(&self, b1: &Object, b2: &Object, h1: Handle, h2: Handle, set: &Set) -> bool;
} where |
Alternatives discussed on Discord:
|
The current API for the broad phase pair filter cannot access any information about the bodies that are colliding. The filter has access to the handles via the
BroadPhasePairFilter
trait but there is not way to retrieve the body information from the set due to the fact thatMechanicalWorld::step
, which calls the filter, requires mutable access to the body set. Utilizing the user data on the collider is sufficient for cases where the information does not change during each step (e.g., parent information) but cannot be used for information about a body that may have been updated.The text was updated successfully, but these errors were encountered: