This commit is contained in:
Sébastien Crozet
2022-03-20 12:54:21 +01:00
committed by Sébastien Crozet
parent d22d3fcc9f
commit c26c8e4932
2 changed files with 7 additions and 5 deletions

View File

@@ -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
wont 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

View File

@@ -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();