diff options
| author | Sébastien Crozet <developer@crozet.re> | 2022-01-16 16:40:59 +0100 |
|---|---|---|
| committer | Sébastien Crozet <developer@crozet.re> | 2022-01-16 16:52:40 +0100 |
| commit | 0703e5527fd95d86bb6621e61dbcb1a6e7f9329a (patch) | |
| tree | 806e7d950015875ebfcca5520784aea6e7c5ae10 /src_testbed/harness/mod.rs | |
| parent | 4454a845e98b990abf3929ca46b59d0fca5a18ec (diff) | |
| download | rapier-0703e5527fd95d86bb6621e61dbcb1a6e7f9329a.tar.gz rapier-0703e5527fd95d86bb6621e61dbcb1a6e7f9329a.tar.bz2 rapier-0703e5527fd95d86bb6621e61dbcb1a6e7f9329a.zip | |
Fix some solver issues
- Fix the wrong codepath taken by the solver for contacts involving a collider without parent.
- Properly adress the non-linear treatment of the friction direction
- Simplify the sleeping strategy
- Add an impulse resolution multiplier
Diffstat (limited to 'src_testbed/harness/mod.rs')
| -rw-r--r-- | src_testbed/harness/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src_testbed/harness/mod.rs b/src_testbed/harness/mod.rs index 3358a70..beebe80 100644 --- a/src_testbed/harness/mod.rs +++ b/src_testbed/harness/mod.rs @@ -8,7 +8,7 @@ use rapier::dynamics::{ RigidBodySet, }; use rapier::geometry::{BroadPhase, ColliderSet, NarrowPhase}; -use rapier::math::Vector; +use rapier::math::{Real, Vector}; use rapier::pipeline::{ChannelEventCollector, PhysicsHooks, PhysicsPipeline, QueryPipeline}; pub mod plugin; @@ -131,7 +131,7 @@ impl Harness { colliders: ColliderSet, impulse_joints: ImpulseJointSet, multibody_joints: MultibodyJointSet, - gravity: Vector<f32>, + gravity: Vector<Real>, hooks: impl PhysicsHooks<RigidBodySet, ColliderSet> + 'static, ) { // println!("Num bodies: {}", bodies.len()); @@ -235,7 +235,7 @@ impl Harness { self.events.poll_all(); - self.state.time += self.physics.integration_parameters.dt; + self.state.time += self.physics.integration_parameters.dt as f32; self.state.timestep_id += 1; } |
