Type fix
This commit is contained in:
committed by
Sébastien Crozet
parent
d22d3fcc9f
commit
c26c8e4932
@@ -9,7 +9,7 @@
|
|||||||
### Modified
|
### Modified
|
||||||
- Rename `JointHandle` to `ImpulseJointHandle`.
|
- Rename `JointHandle` to `ImpulseJointHandle`.
|
||||||
- Rename `RigidBodyMassPropsFlags` to `LockedAxes`.
|
- 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
|
`::add_torque`, and `::add_force_at_point` to better reflect the fact that they are not cleared at the end
|
||||||
of the timestep.
|
of the timestep.
|
||||||
- Rename `RigidBodyType::Static` to `RigidBodyType::Fixed` to avoid confusion with the `static` keyword.
|
- 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.
|
- Improve stability of joint motors.
|
||||||
- Adds a `bool` argument to `RigidBodySet::remove`. If set to `false`, the colliders attached to the rigid-body
|
- 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).
|
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)
|
## v0.12.0-alpha.0 (2 Jan. 2022)
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -696,8 +696,8 @@ impl RigidBody {
|
|||||||
|
|
||||||
/// ## Applying forces and torques
|
/// ## Applying forces and torques
|
||||||
impl RigidBody {
|
impl RigidBody {
|
||||||
/// Resets to zero all the constant (linear) forces applied to this rigid-body.
|
/// Resets to zero all the constant (linear) forces manually applied to this rigid-body.
|
||||||
pub fn reset_force(&mut self, wake_up: bool) {
|
pub fn reset_forces(&mut self, wake_up: bool) {
|
||||||
if !self.rb_forces.user_force.is_zero() {
|
if !self.rb_forces.user_force.is_zero() {
|
||||||
self.rb_forces.user_force = na::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.
|
/// Resets to zero all the constant torques manually applied to this rigid-body.
|
||||||
pub fn reset_torque(&mut self, wake_up: bool) {
|
pub fn reset_torques(&mut self, wake_up: bool) {
|
||||||
if !self.rb_forces.user_torque.is_zero() {
|
if !self.rb_forces.user_torque.is_zero() {
|
||||||
self.rb_forces.user_torque = na::zero();
|
self.rb_forces.user_torque = na::zero();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user