aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2022-03-20 12:54:21 +0100
committerSébastien Crozet <sebastien@crozet.re>2022-03-20 21:49:16 +0100
commitc26c8e4932513615e59f19f353160c9f6e1ac274 (patch)
treeaf17375abe215ad4c843a6f853a8d28fac31e137
parentd22d3fcc9f69c874f08a21b7333933788067fc79 (diff)
downloadrapier-c26c8e4932513615e59f19f353160c9f6e1ac274.tar.gz
rapier-c26c8e4932513615e59f19f353160c9f6e1ac274.tar.bz2
rapier-c26c8e4932513615e59f19f353160c9f6e1ac274.zip
Type fix
-rw-r--r--CHANGELOG.md4
-rw-r--r--src/dynamics/rigid_body.rs8
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();