diff options
| -rw-r--r-- | CHANGELOG.md | 4 | ||||
| -rw-r--r-- | src/dynamics/rigid_body.rs | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 651eb50..0bbfc91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ### Modified - Rename `JointHandle` to `ImpulseJointHandle`. - Rename `RigidBodyMassPropsFlags` to `LockedAxes`. -- Rename `RigidsBody::apply_force`, `::apply_torque`, `::apply_force_at_point` to `::add_force`, +- Rename `RigidBody::apply_force`, `::apply_torque`, `::apply_force_at_point` to `::add_force`, `::add_torque`, and `::add_force_at_point` to better reflect the fact that they are not cleared at the end of the timestep. - Rename `RigidBodyType::Static` to `RigidBodyType::Fixed` to avoid confusion with the `static` keyword. @@ -42,6 +42,8 @@ reflected by an API change: - Improve stability of joint motors. - Adds a `bool` argument to `RigidBodySet::remove`. If set to `false`, the colliders attached to the rigid-body won’t be automatically deleted (they will only be detached from the deleted rigid-body instead). +- Add `RigidBody::reset_forces` and `RigidBody::reset_torques` to reset all the forces and torques added to the + rigid-bodiy by the user. ## v0.12.0-alpha.0 (2 Jan. 2022) ### Fixed diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index 695b256..44a6bc3 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -696,8 +696,8 @@ impl RigidBody { /// ## Applying forces and torques impl RigidBody { - /// Resets to zero all the constant (linear) forces applied to this rigid-body. - pub fn reset_force(&mut self, wake_up: bool) { + /// Resets to zero all the constant (linear) forces manually applied to this rigid-body. + pub fn reset_forces(&mut self, wake_up: bool) { if !self.rb_forces.user_force.is_zero() { self.rb_forces.user_force = na::zero(); @@ -707,8 +707,8 @@ impl RigidBody { } } - /// Resets to zero all the constant torques applied to this rigid-body. - pub fn reset_torque(&mut self, wake_up: bool) { + /// Resets to zero all the constant torques manually applied to this rigid-body. + pub fn reset_torques(&mut self, wake_up: bool) { if !self.rb_forces.user_torque.is_zero() { self.rb_forces.user_torque = na::zero(); |
