From 0703e5527fd95d86bb6621e61dbcb1a6e7f9329a Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sun, 16 Jan 2022 16:40:59 +0100 Subject: 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 --- src_testbed/harness/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src_testbed/harness') 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, + gravity: Vector, hooks: impl PhysicsHooks + '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; } -- cgit