You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contact graph reports NaN or 0 for tangent_impulse when a frictional contact occurs between a capsule and a rectangle or 2 rects. Have not investigated other combinations of shapes, but I imagine this is not isolated to those cases?
thank you for Rapier!
repro code:
A test example:
use std::f32::consts::PI;
use rapier2d::prelude::*;
use rapier_testbed2d::Testbed;
pub fn init_world(testbed: &mut Testbed) {
/*
* World
*/
let mut bodies = RigidBodySet::new();
let mut colliders = ColliderSet::new();
let impulse_joints = ImpulseJointSet::new();
let multibody_joints = MultibodyJointSet::new();
/*
* The ground
*/
let ground_size = 20.0;
let ground_height = 1.0;
let rigid_body = RigidBodyBuilder::fixed().translation(vector![0.0, -3.0]);
let handle = bodies.insert(rigid_body);
let collider = ColliderBuilder::cuboid(ground_size, ground_height)
.rotation(0.25 * PI)
.friction(0.9);
colliders.insert_with_parent(collider, handle, &mut bodies);
/*
* A tilted capsule that cannot rotate.
*/
let rigid_body = RigidBodyBuilder::dynamic()
.translation(vector![0.0, 4.0])
.lock_rotations();
let handle = bodies.insert(rigid_body);
let collider = ColliderBuilder::capsule_y(2.0, 1.0).friction(0.9);
colliders.insert_with_parent(collider, handle, &mut bodies);
/*
* Set up the testbed.
*/
testbed.set_world(bodies, colliders, impulse_joints, multibody_joints);
testbed.look_at(point![0.0, 0.0], 10.0);
}
change to enable printing in src_testbed/testbed.rs, line 1430
if harness.state.timestep_id % 100 == 0 {
let pairs: Vec<_> = harness.physics.narrow_phase.contact_pairs().collect();
println!("contact pairs: {:?}", pairs);
}
quick debug impl for ContactPair in src/geometry/contact_pair.rs, line 133
Contact graph reports NaN or 0 for tangent_impulse when a frictional contact occurs between a capsule and a rectangle or 2 rects. Have not investigated other combinations of shapes, but I imagine this is not isolated to those cases?
thank you for Rapier!
repro code:
A test example:
change to enable printing in src_testbed/testbed.rs, line 1430
quick debug impl for ContactPair in src/geometry/contact_pair.rs, line 133
full print output (note tangent_impulse values)
The text was updated successfully, but these errors were encountered: