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/dynamics/joint/joint_data.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/dynamics/joint/joint_data.rs') diff --git a/src/dynamics/joint/joint_data.rs b/src/dynamics/joint/joint_data.rs index 35d832d..b1ad6c6 100644 --- a/src/dynamics/joint/joint_data.rs +++ b/src/dynamics/joint/joint_data.rs @@ -218,12 +218,14 @@ impl JointData { } /// Set the spring-like model used by the motor to reach the desired target velocity and position. + #[must_use] pub fn motor_model(mut self, axis: JointAxis, model: MotorModel) -> Self { self.motors[axis as usize].model = model; self } /// Sets the target velocity this motor needs to reach. + #[must_use] pub fn motor_velocity(self, axis: JointAxis, target_vel: Real, factor: Real) -> Self { self.motor_axis( axis, @@ -235,6 +237,7 @@ impl JointData { } /// Sets the target angle this motor needs to reach. + #[must_use] pub fn motor_position( self, axis: JointAxis, @@ -246,6 +249,7 @@ impl JointData { } /// Configure both the target angle and target velocity of the motor. + #[must_use] pub fn motor_axis( mut self, axis: JointAxis, @@ -263,6 +267,7 @@ impl JointData { self } + #[must_use] pub fn motor_max_impulse(mut self, axis: JointAxis, max_impulse: Real) -> Self { self.motors[axis as usize].max_impulse = max_impulse; self -- cgit