How to have a negative collision margin? #549
RunnersNum40
started this conversation in
General
Replies: 1 comment
-
|
I've found that adding this system seems to compile. However, I'm not sure if it's actually working or not. My problem hasn't being fixed, but I have some funky stuff with joints that might be an alternative cause. fn collision_callback(mut collisions: ResMut<Collisions>) {
collisions.retain(ignore_collision);
}
fn ignore_collision(contacts: &mut Contacts) -> bool {
const IGNORE_THRESHOLD: f32 = 0.01;
contacts.manifolds.iter().all(|manifold| {
manifold
.contacts
.iter()
.all(|contact| contact.penetration >= IGNORE_THRESHOLD)
})
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on some simulation with some CADed parts that don't have any tolerances. I'd like to prevent erratic behavior when they're put together, so I've tried to add a negative collision margin, but it causes a panic.
Is there any way to get a negative CollisionMargin to work, or to allow a small level of intersection in some other way?
Beta Was this translation helpful? Give feedback.
All reactions