chore: update changelog

This commit is contained in:
Sébastien Crozet
2024-03-23 10:16:59 +01:00
committed by Sébastien Crozet
parent b00113ed2f
commit 6507b7f4fa

View File

@@ -1,8 +1,16 @@
## Unreleased
### Fix
- Fix crash when simulating a spring joint between two dynamic bodies.
## v0.18.0 (24 Jan. 2024) ## v0.18.0 (24 Jan. 2024)
The main highlight of this release is the implementation of a new non-linear constraints solver for better stability The main highlight of this release is the implementation of a new non-linear constraints solver for better stability
and increased convergence rates. See [#579](https://github.com/dimforge/rapier/pull/579) for additional information. and increased convergence rates. See [#579](https://github.com/dimforge/rapier/pull/579) for additional information.
In order to adjust the number of iterations of the new solver, simply adjust `IntegrationParameters::num_solver_iterations`. In order to adjust the number of iterations of the new solver, simply
adjust `IntegrationParameters::num_solver_iterations`.
If recovering the old solver behavior is useful to you, call `IntegrationParameters::switch_to_standard_pgs_solver()`. If recovering the old solver behavior is useful to you, call `IntegrationParameters::switch_to_standard_pgs_solver()`.
It is now possible to specify some additional solver iteration for specific rigid-bodies (and everything interacting It is now possible to specify some additional solver iteration for specific rigid-bodies (and everything interacting
@@ -11,11 +19,15 @@ with it directly or indirectly through contacts and joints): `RigidBodyBuilder::
without affecting performance of the other parts of the simulation. without affecting performance of the other parts of the simulation.
### Fix ### Fix
- Fix bug causing angular joint limits and motor to sometimes only take into account half of the angles specified by the user.
- Fix bug causing angular joint limits and motor to sometimes only take into account half of the angles specified by the
user.
- Fix bug where collisions would not be re-computed after a collider was re-enabled. - Fix bug where collisions would not be re-computed after a collider was re-enabled.
### Added ### Added
- Add a `SpringJoint` and `SpringJointBuilder` for simulating springs with customizable stiffness and damping coefficients.
- Add a `SpringJoint` and `SpringJointBuilder` for simulating springs with customizable stiffness and damping
coefficients.
- Add `SphericalJoint::local_frame1/2`, `::set_local_frame1/2`, and `SphericalJointBuilder::local_frame1/2` to set both - Add `SphericalJoint::local_frame1/2`, `::set_local_frame1/2`, and `SphericalJointBuilder::local_frame1/2` to set both
the joints anchor and reference orientation. the joints anchor and reference orientation.
- Add `EffectiveCharacterMovement::is_sliding_down_slope` to indicate if the character controlled by the kinematic - Add `EffectiveCharacterMovement::is_sliding_down_slope` to indicate if the character controlled by the kinematic
@@ -27,6 +39,7 @@ without affecting performance of the other parts of the simulation.
- Fix debug-renderer showing moved kinematic rigid-bodies only at their initial position. - Fix debug-renderer showing moved kinematic rigid-bodies only at their initial position.
### Modified ### Modified
- Make `Wheel::friction_slip` public to customize the front friction applied to the vehicle controllers wheels. - Make `Wheel::friction_slip` public to customize the front friction applied to the vehicle controllers wheels.
- Add the `DebugRenderBackend::filter_object` predicate that can be implemented to apply custom filtering rules - Add the `DebugRenderBackend::filter_object` predicate that can be implemented to apply custom filtering rules
on the objects being rendered. on the objects being rendered.
@@ -35,19 +48,24 @@ without affecting performance of the other parts of the simulation.
- Rename `NarrowPhase::intersections_with` to `NarrowPhase::intersection_pairs_with`. - Rename `NarrowPhase::intersections_with` to `NarrowPhase::intersection_pairs_with`.
## v0.17.2 (26 Feb. 2023) ## v0.17.2 (26 Feb. 2023)
### Fix ### Fix
- Fix issue with convex polyhedron jitter due to missing contacts. - Fix issue with convex polyhedron jitter due to missing contacts.
- Fix character controller getting stuck against vertical walls. - Fix character controller getting stuck against vertical walls.
- Fix character controllers snapping to ground not triggering sometimes. - Fix character controllers snapping to ground not triggering sometimes.
- Fix character controllers horizontal offset being mostly ignored and some instances of vertical offset being ignored. - Fix character controllers horizontal offset being mostly ignored and some instances of vertical offset being ignored.
## v0.17.1 (22 Jan. 2023) ## v0.17.1 (22 Jan. 2023)
### Fix ### Fix
- Fix bug resulting in dynamic rigid-bodies acting as kinematic bodies after being disabled and then re-enabled. - Fix bug resulting in dynamic rigid-bodies acting as kinematic bodies after being disabled and then re-enabled.
## v0.17.0 (15 Jan. 2023) ## v0.17.0 (15 Jan. 2023)
### Added ### Added
- Add `RigidBody::set_enabled`, `RigidBody::is_enabled`, `RigidBodyBuilder::enabled` to enable/disable a rigid-body - Add `RigidBody::set_enabled`, `RigidBody::is_enabled`, `RigidBodyBuilder::enabled` to enable/disable a rigid-body
without having to delete it. Disabling a rigid-body attached to a multibody joint isnt supported yet. without having to delete it. Disabling a rigid-body attached to a multibody joint isnt supported yet.
- Add `Collider::set_enabled`, `Collider::is_enabled`, `ColliderBuilder::enabled` to enable/disable a collider - Add `Collider::set_enabled`, `Collider::is_enabled`, `ColliderBuilder::enabled` to enable/disable a collider
@@ -61,37 +79,48 @@ without affecting performance of the other parts of the simulation.
- Add `RigidBody::locked_axes` to get the rigid-body axes that were locked by the user. - Add `RigidBody::locked_axes` to get the rigid-body axes that were locked by the user.
### Modified ### Modified
- Add the `QueryPipeline` as an optional argument to `PhysicsPipeline::step` and `CollisionPipeline::step`. If this - Add the `QueryPipeline` as an optional argument to `PhysicsPipeline::step` and `CollisionPipeline::step`. If this
argument is specified, then the query pipeline will be incrementally (i.e. more efficiently) update at the same time as argument is specified, then the query pipeline will be incrementally (i.e. more efficiently) update at the same time
as
these other pipelines. In that case, calling `QueryPipeline::update` a `PhysicsPipeline::step` isnt needed. these other pipelines. In that case, calling `QueryPipeline::update` a `PhysicsPipeline::step` isnt needed.
- `RigidBody::set_body_type` now takes an extra boolean argument indicating if the rigid-body should be woken-up - `RigidBody::set_body_type` now takes an extra boolean argument indicating if the rigid-body should be woken-up
(if it becomes dynamic). (if it becomes dynamic).
- `RigidBody::mass_properties` now also returns the world-space mass-properties of the rigid-body. - `RigidBody::mass_properties` now also returns the world-space mass-properties of the rigid-body.
### Fix ### Fix
- Fix bug resulting in rigid-bodies being awakened after they are created, even if they are created sleeping. - Fix bug resulting in rigid-bodies being awakened after they are created, even if they are created sleeping.
## v0.16.1 (10 Nov. 2022) ## v0.16.1 (10 Nov. 2022)
### Fix ### Fix
- Fixed docs build on `docs.rs`. - Fixed docs build on `docs.rs`.
## v0.16.0 (30 Oct. 2022) ## v0.16.0 (30 Oct. 2022)
### Added ### Added
- Implement `Copy` for `CharacterCollision`. - Implement `Copy` for `CharacterCollision`.
- Implement conversion (`From` trait) between `Group` and `u32`. - Implement conversion (`From` trait) between `Group` and `u32`.
- Add `ColliderBuilder::trimesh_with_flags` to build a triangle mesh with specific flags controlling - Add `ColliderBuilder::trimesh_with_flags` to build a triangle mesh with specific flags controlling
its initialization. its initialization.
### Modified ### Modified
- Rename `AABB` to `Aabb` to comply with Rusts style guide. - Rename `AABB` to `Aabb` to comply with Rusts style guide.
- Switch to `parry 0.11`. - Switch to `parry 0.11`.
### Fix ### Fix
- Fix internal edges of 3D triangle meshes or 3D heightfields generating invalid contacts preventing - Fix internal edges of 3D triangle meshes or 3D heightfields generating invalid contacts preventing
balls from moving straight. balls from moving straight.
## v0.15.0 (02 Oct. 2022) ## v0.15.0 (02 Oct. 2022)
### Added ### Added
- Add a **kinematic character** controller implementation. See the `control` module. The character controller currently - Add a **kinematic character** controller implementation. See the `control` module. The character controller currently
supports the following features: supports the following features:
- Slide on uneven terrains - Slide on uneven terrains
@@ -104,8 +133,8 @@ without affecting performance of the other parts of the simulation.
- Report information on the obstacles it hit on its path. - Report information on the obstacles it hit on its path.
- Implement `serde` serialization/deserialization for `CollisionEvents` when the `serde-serialize` feature is enabled - Implement `serde` serialization/deserialization for `CollisionEvents` when the `serde-serialize` feature is enabled
### Modified ### Modified
- The methods `Collider::set_rotation`, `RigidBody::set_rotation`, and `RigidBody::set_next_kinematic_rotation` now - The methods `Collider::set_rotation`, `RigidBody::set_rotation`, and `RigidBody::set_next_kinematic_rotation` now
take a rotation (`UnitQuaternion` or `UnitComplex`) instead of a vector/angle. take a rotation (`UnitQuaternion` or `UnitComplex`) instead of a vector/angle.
- The method `QueryFilter::exclude_dynamic` is now a static method (the `self` argument was removed). - The method `QueryFilter::exclude_dynamic` is now a static method (the `self` argument was removed).
@@ -117,7 +146,9 @@ without affecting performance of the other parts of the simulation.
position. position.
## v0.14.0 (09 July 2022) ## v0.14.0 (09 July 2022)
### Fixed ### Fixed
- Fix unpredictable broad-phase panic when using small colliders in the simulation. - Fix unpredictable broad-phase panic when using small colliders in the simulation.
- Fix collision events being incorrectly generated for any shape that produces multiple - Fix collision events being incorrectly generated for any shape that produces multiple
contact manifolds (like triangle meshes). contact manifolds (like triangle meshes).
@@ -125,6 +156,7 @@ without affecting performance of the other parts of the simulation.
to `CollisionPipeline::step`. to `CollisionPipeline::step`.
### Modified ### Modified
- The `RigidBodyBuilder::additional_mass` method will now result in the additional angular inertia - The `RigidBodyBuilder::additional_mass` method will now result in the additional angular inertia
being automatically computed based on the shapes of the colliders attached to the rigid-body. being automatically computed based on the shapes of the colliders attached to the rigid-body.
- Remove the deprecated methods `RigidBodyBuilder::mass`, `::principal_angular_inertia`, `::principal_inertia`. - Remove the deprecated methods `RigidBodyBuilder::mass`, `::principal_angular_inertia`, `::principal_inertia`.
@@ -137,6 +169,7 @@ without affecting performance of the other parts of the simulation.
`RigidBodyBuilder::enabled_rotations` and `RigidBodyBuilder::enabled_translations`. `RigidBodyBuilder::enabled_rotations` and `RigidBodyBuilder::enabled_translations`.
### Added ### Added
- Add `RigidBody::recompute_mass_properties_from_colliders` to force the immediate computation - Add `RigidBody::recompute_mass_properties_from_colliders` to force the immediate computation
of a rigid-bodys mass properties (instead of waiting for them to be recomputed during the next of a rigid-bodys mass properties (instead of waiting for them to be recomputed during the next
timestep). This is useful to be able to read immediately the result of a change of a rigid-body timestep). This is useful to be able to read immediately the result of a change of a rigid-body
@@ -149,7 +182,8 @@ without affecting performance of the other parts of the simulation.
- Add `ColliderBuilder::mass` to set the mass of the collider instead of its density. Its angular - Add `ColliderBuilder::mass` to set the mass of the collider instead of its density. Its angular
inertia tensor will be automatically computed based on this mass and its shape. inertia tensor will be automatically computed based on this mass and its shape.
- Add `Collider::mass` and `Collider::volume` to retrieve the mass or volume of a collider. - Add `Collider::mass` and `Collider::volume` to retrieve the mass or volume of a collider.
- Add the `QueryFilter` that is now used by all the scene queries instead of the `CollisionGroups` and `Fn(ColliderHandle) -> bool` - Add the `QueryFilter` that is now used by all the scene queries instead of the `CollisionGroups`
and `Fn(ColliderHandle) -> bool`
closure. This `QueryFilter` provides easy access to most common filtering strategies (e.g. dynamic bodies only, closure. This `QueryFilter` provides easy access to most common filtering strategies (e.g. dynamic bodies only,
excluding one particular collider, etc.) for scene queries. excluding one particular collider, etc.) for scene queries.
- Add force reporting based on contact force events. The `EventHandler` trait has been modified to include - Add force reporting based on contact force events. The `EventHandler` trait has been modified to include
@@ -161,12 +195,15 @@ without affecting performance of the other parts of the simulation.
contact force events. contact force events.
## v0.13.0 (31 May 2022) ## v0.13.0 (31 May 2022)
### Fixed ### Fixed
- Fix incorrect sensor events being generated after collider removal. - Fix incorrect sensor events being generated after collider removal.
- Fix bug where the CCD thickness wasnt initialized properly. - Fix bug where the CCD thickness wasnt initialized properly.
- Fix bug where the contact compliance would result in undesired tunneling, despite CCD being enabled. - Fix bug where the contact compliance would result in undesired tunneling, despite CCD being enabled.
### Modified ### Modified
- Add a `wake_up: bool` argument to the `ImpulseJointSet::insert` and `MultibodyJointSet::insert` to - Add a `wake_up: bool` argument to the `ImpulseJointSet::insert` and `MultibodyJointSet::insert` to
automatically wake-up the rigid-bodies attached to the inserted joint. automatically wake-up the rigid-bodies attached to the inserted joint.
- The methods `ImpulseJointSet::remove/remove_joints_attached_to_rigid_body`, - The methods `ImpulseJointSet::remove/remove_joints_attached_to_rigid_body`,
@@ -180,11 +217,14 @@ without affecting performance of the other parts of the simulation.
by default. by default.
### Added ### Added
- Debug-renderer: add rendering of contacts, solver contacts, and collider Aabbs - Debug-renderer: add rendering of contacts, solver contacts, and collider Aabbs
- Add `MultibodyJointSet::attached_joints` to return all the multibody joints attached to a given rigid-body. - Add `MultibodyJointSet::attached_joints` to return all the multibody joints attached to a given rigid-body.
## v0.12.0 (30 Apr. 2022) ## v0.12.0 (30 Apr. 2022)
### Fixed ### Fixed
- Fix the simulation when the `parallel` feature is enabled. - Fix the simulation when the `parallel` feature is enabled.
- Fix bug where damping would not be applied properly to some bodies. - Fix bug where damping would not be applied properly to some bodies.
- Fix panics caused by various situations (contact or joints) involving rigid-bodies with locked translations/rotations. - Fix panics caused by various situations (contact or joints) involving rigid-bodies with locked translations/rotations.
@@ -194,6 +234,7 @@ without affecting performance of the other parts of the simulation.
- Fix the broad-phase becoming potentially invalid after a change of collision groups. - Fix the broad-phase becoming potentially invalid after a change of collision groups.
### Modified ### Modified
- Switch to `nalgebra` 0.31. - Switch to `nalgebra` 0.31.
- Switch to `parry` 0.9. - Switch to `parry` 0.9.
- Rename `JointHandle` to `ImpulseJointHandle`. - Rename `JointHandle` to `ImpulseJointHandle`.
@@ -218,8 +259,10 @@ without affecting performance of the other parts of the simulation.
`ColliderSet` instead. `ColliderSet` instead.
### Semantic modifications ### Semantic modifications
These are changes in the behavior of the physics engine that are not necessarily These are changes in the behavior of the physics engine that are not necessarily
reflected by an API change. See [#304](https://github.com/dimforge/rapier/pull/304) for extensive details. reflected by an API change. See [#304](https://github.com/dimforge/rapier/pull/304) for extensive details.
- `RigidBody::set_linvel` and `RigidBody::set_angvel` no longer modify the velocity of static bodies. - `RigidBody::set_linvel` and `RigidBody::set_angvel` no longer modify the velocity of static bodies.
- `RigidBody::set_body_type` will reset the velocity of a rigid-body to zero if it is static. - `RigidBody::set_body_type` will reset the velocity of a rigid-body to zero if it is static.
- Dont automatically clear forces at the end of a timestep. - Dont automatically clear forces at the end of a timestep.
@@ -227,6 +270,7 @@ reflected by an API change. See [#304](https://github.com/dimforge/rapier/pull/3
- Events `CollisionEvent::Stopped` are now generated after a collider is removed. - Events `CollisionEvent::Stopped` are now generated after a collider is removed.
### Added ### Added
- Significantly improve the API of joints by adding: - Significantly improve the API of joints by adding:
* Builders based on the builder pattern. * Builders based on the builder pattern.
* Getters and setters for all joints. * Getters and setters for all joints.
@@ -240,9 +284,13 @@ reflected by an API change. See [#304](https://github.com/dimforge/rapier/pull/3
renderer to debug the state of the physics engine. renderer to debug the state of the physics engine.
## v0.12.0-alpha.0 (2 Jan. 2022) ## v0.12.0-alpha.0 (2 Jan. 2022)
### Fixed ### Fixed
- Fixed `RigidBody::restrict_rotations` to properly take into account the axes to lock. - Fixed `RigidBody::restrict_rotations` to properly take into account the axes to lock.
### Modified ### Modified
- All the impulse-based joints have been replaced by a single generic 6-Dofs joint in 3D - All the impulse-based joints have been replaced by a single generic 6-Dofs joint in 3D
(or 3-Dofs joint in 2D) named `ImpulseJoint`. The `RevoluteJoint, PrismaticJoint, FixedJoint`, (or 3-Dofs joint in 2D) named `ImpulseJoint`. The `RevoluteJoint, PrismaticJoint, FixedJoint`,
and `SphericalJoint` (formely named `BallJoint`) structures still exist but are just convenient and `SphericalJoint` (formely named `BallJoint`) structures still exist but are just convenient
@@ -253,63 +301,81 @@ reflected by an API change. See [#304](https://github.com/dimforge/rapier/pull/3
code significantly while offering stiffer results. code significantly while offering stiffer results.
### Added ### Added
- Added multibody joints: joints based on the reduced-coordinates modeling. These joints cant - Added multibody joints: joints based on the reduced-coordinates modeling. These joints cant
violate their positional constraint. violate their positional constraint.
- Implement `Default` for most of the struct that supports it. - Implement `Default` for most of the struct that supports it.
## v0.11.1 ## v0.11.1
### Fixed ### Fixed
- Fix a bug causing large moving colliders to miss some collisions after some time. - Fix a bug causing large moving colliders to miss some collisions after some time.
- Fix invalid forces generated by contacts with position-based kinematic bodies. - Fix invalid forces generated by contacts with position-based kinematic bodies.
- Fix a bug where two colliders without parent would not have their collision computed even if the - Fix a bug where two colliders without parent would not have their collision computed even if the
appropriate flags were set. appropriate flags were set.
## v0.11.0 ## v0.11.0
Check out the user-guide for the JS/Typescript bindings for rapier. It has been fully rewritten and is now exhaustive! Check out the user-guide for the JS/Typescript bindings for rapier. It has been fully rewritten and is now exhaustive!
Check it out on [rapier.rs](https://www.rapier.rs/docs/user_guides/javascript/getting_started_js) Check it out on [rapier.rs](https://www.rapier.rs/docs/user_guides/javascript/getting_started_js)
### Added ### Added
- Joint limits are now implemented for all joints that can support them (prismatic, revolute, and ball joints). - Joint limits are now implemented for all joints that can support them (prismatic, revolute, and ball joints).
### Modified ### Modified
- Switch to `nalgebra 0.29`. - Switch to `nalgebra 0.29`.
### Fixed ### Fixed
- Fix the build of Rapier when targeting emscripten. - Fix the build of Rapier when targeting emscripten.
## v0.10.1 ## v0.10.1
### Added ### Added
- Add `Collider::set_translation_wrt_parent` to change the translation of a collider with respect to its parent rigid-body.
- Add `Collider::set_translation_wrt_parent` to change the translation of a collider with respect to its parent
rigid-body.
- Add `Collider::set_rotation_wrt_parent` to change the translation of a collider with respect to its parent rigid-body. - Add `Collider::set_rotation_wrt_parent` to change the translation of a collider with respect to its parent rigid-body.
## v0.10.0 ## v0.10.0
### Added ### Added
- Implement `Clone` for `IslandManager`. - Implement `Clone` for `IslandManager`.
### Modified ### Modified
- `JointSet::insert` no longer takes the rigid-body set in its arguments. - `JointSet::insert` no longer takes the rigid-body set in its arguments.
- Modify the testbed's plugin system to let plugins interact with the rendering. - Modify the testbed's plugin system to let plugins interact with the rendering.
- Implement `PartialEq` for most collider and rigid-body components. - Implement `PartialEq` for most collider and rigid-body components.
## v0.9.2 ## v0.9.2
### Added ### Added
- Make the method JointSet::remove_joints_attached_to_rigid_body public so that it can can be called externally for - Make the method JointSet::remove_joints_attached_to_rigid_body public so that it can can be called externally for
letting component-based Rapier integration call it to cleanup joints after a rigid-body removal. letting component-based Rapier integration call it to cleanup joints after a rigid-body removal.
### Fixed ### Fixed
- Fix a panic that could happen when the same collider is listed twice in the removed_colliders array. - Fix a panic that could happen when the same collider is listed twice in the removed_colliders array.
## v0.9.1 ## v0.9.1
### Added ### Added
- Add `rapier::prelude::nalgebra` so that the `vector!` and `point!` macros work out-of-the-box after importing - Add `rapier::prelude::nalgebra` so that the `vector!` and `point!` macros work out-of-the-box after importing
the prelude: `use rapier::prelude::*` the prelude: `use rapier::prelude::*`
## v0.9.0 ## v0.9.0
The user-guide has been fully rewritten and is now exhaustive! Check it out on [rapier.rs](https://rapier.rs/) The user-guide has been fully rewritten and is now exhaustive! Check it out on [rapier.rs](https://rapier.rs/)
### Added ### Added
- A prelude has been added in order to simplify the most common imports. For example: `use rapier3d::prelude::*` - A prelude has been added in order to simplify the most common imports. For example: `use rapier3d::prelude::*`
- Add `RigidBody::set_translation` and `RigidBody.translation()`. - Add `RigidBody::set_translation` and `RigidBody.translation()`.
- Add `RigidBody::set_rotation` and `RigidBody.rotation()`. - Add `RigidBody::set_rotation` and `RigidBody.rotation()`.
@@ -322,6 +388,7 @@ The user-guide has been fully rewritten and is now exhaustive! Check it out on [
some SIMD code do generate NaNs which are filtered out by lane-wise selection). some SIMD code do generate NaNs which are filtered out by lane-wise selection).
### Modified ### Modified
The use of `RigidBodySet, ColliderSet, RigidBody, Collider` is no longer mandatory. Rigid-bodies and colliders have The use of `RigidBodySet, ColliderSet, RigidBody, Collider` is no longer mandatory. Rigid-bodies and colliders have
been split into multiple components that can be stored in a user-defined set. This is useful for integrating Rapier been split into multiple components that can be stored in a user-defined set. This is useful for integrating Rapier
with other engines (for example this allows us to use Bevy's Query as our rigid-body/collider sets). with other engines (for example this allows us to use Bevy's Query as our rigid-body/collider sets).
@@ -330,6 +397,7 @@ The `RigidBodySet, ColliderSet, RigidBody, Collider` are still the best option f
provide their own component sets. provide their own component sets.
#### Rigid-bodies #### Rigid-bodies
- Renamed `BodyStatus` to `RigidBodyType`. - Renamed `BodyStatus` to `RigidBodyType`.
- `RigidBodyBuilder::translation` now takes a vector instead of individual components. - `RigidBodyBuilder::translation` now takes a vector instead of individual components.
- `RigidBodyBuilder::linvel` now takes a vector instead of individual components. - `RigidBodyBuilder::linvel` now takes a vector instead of individual components.
@@ -339,6 +407,7 @@ provide their own component sets.
`RigidBodyType::KinematicPositionBased`. `RigidBodyType::KinematicPositionBased`.
#### Colliders #### Colliders
- `Colliderbuilder::translation` now takes a vector instead of individual components. - `Colliderbuilder::translation` now takes a vector instead of individual components.
- The way `PhysicsHooks` are enabled changed. Now, a physics hooks is executed if any of the two - The way `PhysicsHooks` are enabled changed. Now, a physics hooks is executed if any of the two
colliders involved in the contact/intersection pair contains the related `PhysicsHooksFlag`. colliders involved in the contact/intersection pair contains the related `PhysicsHooksFlag`.
@@ -360,10 +429,12 @@ provide their own component sets.
- Fixed a bug where collision groups were ignored by CCD. - Fixed a bug where collision groups were ignored by CCD.
#### Joints #### Joints
- The fields `FixedJoint::local_anchor1` and `FixedJoint::local_anchor2` have been renamed to - The fields `FixedJoint::local_anchor1` and `FixedJoint::local_anchor2` have been renamed to
`FixedJoint::local_frame1` and `FixedJoint::local_frame2`. `FixedJoint::local_frame1` and `FixedJoint::local_frame2`.
#### Pipelines and others #### Pipelines and others
- The field `ContactPair::pair` (which contained two collider handles) has been replaced by two - The field `ContactPair::pair` (which contained two collider handles) has been replaced by two
fields: `ContactPair::collider1` and `ContactPair::collider2`. fields: `ContactPair::collider1` and `ContactPair::collider2`.
- The list of active dynamic bodies is now retrieved with `IslandManager::active_dynamic_bodies` - The list of active dynamic bodies is now retrieved with `IslandManager::active_dynamic_bodies`
@@ -377,25 +448,33 @@ provide their own component sets.
- Rename `PhysicsHooksFlags` to `ActiveHooks`. - Rename `PhysicsHooksFlags` to `ActiveHooks`.
- Add the contact pair as an argument to `EventHandler::handle_contact_event` - Add the contact pair as an argument to `EventHandler::handle_contact_event`
## v0.8.0 ## v0.8.0
### Modified ### Modified
- Switch to nalgebra 0.26. - Switch to nalgebra 0.26.
## v0.7.2 ## v0.7.2
### Added ### Added
- Implement `Serialize` and `Deserialize` for the `CCDSolver`. - Implement `Serialize` and `Deserialize` for the `CCDSolver`.
### Fixed ### Fixed
- Fix a crash that could happen after adding and then removing a collider right away, - Fix a crash that could happen after adding and then removing a collider right away,
before stepping the simulation. before stepping the simulation.
## v0.7.1 ## v0.7.1
### Fixed ### Fixed
- Fixed a bug in the broad-phase that could cause non-determinism after snapshot restoration. - Fixed a bug in the broad-phase that could cause non-determinism after snapshot restoration.
## v0.7.0 ## v0.7.0
### Added ### Added
- Add the support of **Continuous Collision Detection** (CCD) to - Add the support of **Continuous Collision Detection** (CCD) to
make sure that some fast-moving objects (chosen by the user) don't miss any contacts. make sure that some fast-moving objects (chosen by the user) don't miss any contacts.
This is done by using motion-clamping, i.e., each fast-moving rigid-body with CCD enabled will This is done by using motion-clamping, i.e., each fast-moving rigid-body with CCD enabled will
@@ -415,6 +494,7 @@ position solver (this is disabled by default, set `IntegrationParameters::veloci
a value `> 0.0` to enable.). a value `> 0.0` to enable.).
Added the methods: Added the methods:
- `ColliderBuilder::halfspace` to create a collider with an unbounded plane shape. - `ColliderBuilder::halfspace` to create a collider with an unbounded plane shape.
- `Collider::shape_mut` to get a mutable reference to its shape. - `Collider::shape_mut` to get a mutable reference to its shape.
- `Collider::set_shape`, `::set_restitution_combine_rule`, `::set_position_wrt_parent`, `::set_collision_groups` - `Collider::set_shape`, `::set_restitution_combine_rule`, `::set_position_wrt_parent`, `::set_collision_groups`
@@ -422,10 +502,12 @@ Added the methods:
- `RigidBodyBuilder::ccd_enabled` to enable CCD for a rigid-body. - `RigidBodyBuilder::ccd_enabled` to enable CCD for a rigid-body.
### Modified ### Modified
- The `target_dist` argument of `QueryPipeline::cast_shape` was removed. - The `target_dist` argument of `QueryPipeline::cast_shape` was removed.
- `RigidBodyBuilder::mass_properties` has been deprecated, replaced by `::additional_mass_properties`. - `RigidBodyBuilder::mass_properties` has been deprecated, replaced by `::additional_mass_properties`.
- `RigidBodyBuilder::mass` has been deprecated, replaced by `::additional_mass`. - `RigidBodyBuilder::mass` has been deprecated, replaced by `::additional_mass`.
- `RigidBodyBuilder::principal_angular_inertia` has been deprecated, replaced by `::additional_principal_angular_inertia`. - `RigidBodyBuilder::principal_angular_inertia` has been deprecated, replaced
by `::additional_principal_angular_inertia`.
- The field `SolveContact::data` has been replaced by the fields `SolverContact::warmstart_impulse`, - The field `SolveContact::data` has been replaced by the fields `SolverContact::warmstart_impulse`,
`SolverContact::warmstart_tangent_impulse`, and `SolverContact::prev_rhs`. `SolverContact::warmstart_tangent_impulse`, and `SolverContact::prev_rhs`.
- All the fields of `IntegrationParameters` that we don't use have been removed. - All the fields of `IntegrationParameters` that we don't use have been removed.
@@ -433,42 +515,53 @@ Added the methods:
- `BroadPhase::maintain` has been removed. Use ` BroadPhase::update` directly. - `BroadPhase::maintain` has been removed. Use ` BroadPhase::update` directly.
### Fixed ### Fixed
- The Broad-Phase algorithm has been completely reworked to support large colliders properly (until now - The Broad-Phase algorithm has been completely reworked to support large colliders properly (until now
they could result in very large memory and CPU usage). they could result in very large memory and CPU usage).
## v0.6.1 ## v0.6.1
### Fixed ### Fixed
- Fix a determinism problem that may happen after snapshot restoration, if a rigid-body is sleeping at - Fix a determinism problem that may happen after snapshot restoration, if a rigid-body is sleeping at
the time the snapshot is taken. the time the snapshot is taken.
## v0.6.0 ## v0.6.0
### Added ### Added
- The support of **dominance groups** have been added. Each rigid-body is part of a dominance group in [-127; 127] - The support of **dominance groups** have been added. Each rigid-body is part of a dominance group in [-127; 127]
(the default is 0). If two rigid-body are in contact, the one with the highest dominance will act as if it has (the default is 0). If two rigid-body are in contact, the one with the highest dominance will act as if it has
an infinite mass, making it immune to the forces the other body would apply on it. See [#122](https://github.com/dimforge/rapier/pull/122) an infinite mass, making it immune to the forces the other body would apply on it.
See [#122](https://github.com/dimforge/rapier/pull/122)
for further details. for further details.
- The support for **contact modification** has been added. This can bee used to simulate conveyor belts, - The support for **contact modification** has been added. This can bee used to simulate conveyor belts,
one-way platforms and other non-physical effects. It can also be used to simulate materials with one-way platforms and other non-physical effects. It can also be used to simulate materials with
variable friction and restitution coefficient on a single collider. See [#120](https://github.com/dimforge/rapier/pull/120) variable friction and restitution coefficient on a single collider.
See [#120](https://github.com/dimforge/rapier/pull/120)
for further details. for further details.
- The support for **joint motors** have been added. This can be used to control the position and/or - The support for **joint motors** have been added. This can be used to control the position and/or
velocity of a joint based on a spring-like equation. See [#119](https://github.com/dimforge/rapier/pull/119) velocity of a joint based on a spring-like equation. See [#119](https://github.com/dimforge/rapier/pull/119)
for further details. for further details.
### Removed ### Removed
- The `ContactPairFilter` and `IntersectionPairFilter` traits have been removed. They are both - The `ContactPairFilter` and `IntersectionPairFilter` traits have been removed. They are both
combined in a single new trait: `PhysicsHooks`. combined in a single new trait: `PhysicsHooks`.
## v0.5.0 ## v0.5.0
In this release we are dropping `ncollide` and use our new crate [`parry`](https://parry.rs) In this release we are dropping `ncollide` and use our new crate [`parry`](https://parry.rs)
instead! This comes with a lot of new features, as well as two new crates: `rapier2d-f64` and instead! This comes with a lot of new features, as well as two new crates: `rapier2d-f64` and
`rapier3d-f64` for physics simulation with 64-bits floats. `rapier3d-f64` for physics simulation with 64-bits floats.
### Added ### Added
- Added a `RAPIER.version()` function at the root of the package to retrieve the version of Rapier - Added a `RAPIER.version()` function at the root of the package to retrieve the version of Rapier
as a string. as a string.
Several geometric queries have been added to the `QueryPipeline`: Several geometric queries have been added to the `QueryPipeline`:
- `QueryPipeline::intersections_with_ray`: get all colliders intersecting a ray. - `QueryPipeline::intersections_with_ray`: get all colliders intersecting a ray.
- `QueryPipeline::intersection_with_shape`: get one collider intersecting a shape. - `QueryPipeline::intersection_with_shape`: get one collider intersecting a shape.
- `QueryPipeline::project_point`: get the projection of a point on the closest collider. - `QueryPipeline::project_point`: get the projection of a point on the closest collider.
@@ -478,22 +571,27 @@ Several geometric queries have been added to the `QueryPipeline`:
- `QueryPipeline::intersections_with_shape`: get all the colliders intersecting a shape. - `QueryPipeline::intersections_with_shape`: get all the colliders intersecting a shape.
Several new shape types are now supported: Several new shape types are now supported:
- `RoundCuboid`, `Segment`, `Triangle`, `RoundTriangle`, `Polyline`, `ConvexPolygon` (2D only), - `RoundCuboid`, `Segment`, `Triangle`, `RoundTriangle`, `Polyline`, `ConvexPolygon` (2D only),
`RoundConvexPolygon` (2D only), `ConvexPolyhedron` (3D only), `RoundConvexPolyhedron` (3D only), `RoundConvexPolygon` (2D only), `ConvexPolyhedron` (3D only), `RoundConvexPolyhedron` (3D only),
`RoundCone` (3D only). `RoundCone` (3D only).
It is possible to build `ColliderDesc` using these new shapes: It is possible to build `ColliderDesc` using these new shapes:
- `ColliderBuilder::round_cuboid`, `ColliderBuilder::segment`, `ColliderBuilder::triangle`, `ColliderBuilder::round_triangle`, - `ColliderBuilder::round_cuboid`, `ColliderBuilder::segment`, `ColliderBuilder::triangle`, `ColliderBuilder::round_triangle`,
`ColliderBuilder::convex_hull`, `ColliderBuilder::round_convex_hull`, `ColliderBuilder::polyline`, `ColliderBuilder::convex_hull`, `ColliderBuilder::round_convex_hull`, `ColliderBuilder::polyline`,
`ColliderBuilder::convex_decomposition`, `ColliderBuilder::round_convex_decomposition`, `ColliderBuilder::convex_decomposition`, `ColliderBuilder::round_convex_decomposition`,
`ColliderBuilder::convex_polyline` (2D only), `ColliderBuilder::round_convex_polyline` (2D only), `ColliderBuilder::convex_polyline` (2D only), `ColliderBuilder::round_convex_polyline` (2D only),
`ColliderBuilder::convex_mesh` (3D only),`ColliderBuilder::round_convex_mesh` (3D only), `ColliderBuilder::round_cone` (3D only). `ColliderBuilder::convex_mesh` (3D only),`ColliderBuilder::round_convex_mesh` (3D
only), `ColliderBuilder::round_cone` (3D only).
It is possible to specify different rules for combining friction and restitution coefficients It is possible to specify different rules for combining friction and restitution coefficients
of the two colliders involved in a contact with: of the two colliders involved in a contact with:
- `ColliderDesc::friction_combine_rule`, and `ColliderDesc::restitution_combine_rule`. - `ColliderDesc::friction_combine_rule`, and `ColliderDesc::restitution_combine_rule`.
Various RigidBody-related getter and setters have been added: Various RigidBody-related getter and setters have been added:
- `RigidBodyBuilder::gravity_scale`, `RigidBody::gravity_scale`, `RigidBody::set_gravity_scale` to get/set the scale - `RigidBodyBuilder::gravity_scale`, `RigidBody::gravity_scale`, `RigidBody::set_gravity_scale` to get/set the scale
factor applied to the gravity affecting a rigid-body. Setting this to 0.0 will make the rigid-body ignore gravity. factor applied to the gravity affecting a rigid-body. Setting this to 0.0 will make the rigid-body ignore gravity.
- `RigidBody::set_linear_damping` and `RigidBody::set_angular_damping` to set the linear and angular damping of - `RigidBody::set_linear_damping` and `RigidBody::set_angular_damping` to set the linear and angular damping of
@@ -502,42 +600,54 @@ Various RigidBody-related getter and setters have been added:
boolean arguments previously passed to `.set_principal_angular_inertia`. boolean arguments previously passed to `.set_principal_angular_inertia`.
### Breaking changes ### Breaking changes
Breaking changes related to contacts: Breaking changes related to contacts:
- The way contacts are represented changed. Refer to the documentation of `parry::query::ContactManifold`, `parry::query::TrackedContact`
- The way contacts are represented changed. Refer to the documentation
of `parry::query::ContactManifold`, `parry::query::TrackedContact`
and `rapier::geometry::ContactManifoldData` and `rapier::geometry::ContactData` for details. and `rapier::geometry::ContactManifoldData` and `rapier::geometry::ContactData` for details.
Breaking changes related to rigid-bodies: Breaking changes related to rigid-bodies:
- The `RigidBodyDesc.setMass` takes only one argument now. Use `RigidBodyDesc.lockTranslations` to lock the translational
- The `RigidBodyDesc.setMass` takes only one argument now. Use `RigidBodyDesc.lockTranslations` to lock the
translational
motion of the rigid-body. motion of the rigid-body.
- The `RigidBodyDesc.setPrincipalAngularInertia` no longer have boolean parameters to lock rotations. - The `RigidBodyDesc.setPrincipalAngularInertia` no longer have boolean parameters to lock rotations.
Use `RigidBodyDesc.lockRotations` or `RigidBodyDesc.restrictRotations` to lock the rotational motion of the rigid-body. Use `RigidBodyDesc.lockRotations` or `RigidBodyDesc.restrictRotations` to lock the rotational motion of the
rigid-body.
Breaking changes related to colliders: Breaking changes related to colliders:
- The collider shape type has been renamed from `ColliderShape` to `SharedShape` (now part of the Parry crate). - The collider shape type has been renamed from `ColliderShape` to `SharedShape` (now part of the Parry crate).
- The `Polygon` shape no longer exists. For a 2D convex polygon, use a `ConvexPolygon` instead. - The `Polygon` shape no longer exists. For a 2D convex polygon, use a `ConvexPolygon` instead.
- All occurrences of `Trimesh` have been replaced by `TriMesh` (note the change in case). - All occurrences of `Trimesh` have been replaced by `TriMesh` (note the change in case).
Breaking changes related to events: Breaking changes related to events:
- Rename all occurrences of `Proximity` to `Intersection`. - Rename all occurrences of `Proximity` to `Intersection`.
- The `Proximity` enum has been removed, it's replaced by a boolean. - The `Proximity` enum has been removed, it's replaced by a boolean.
## v0.4.2 ## v0.4.2
- Fix a bug in angular inertia tensor computation that could cause rotations not to - Fix a bug in angular inertia tensor computation that could cause rotations not to
work properly. work properly.
- Add `RigidBody::set_mass_properties` to set the mass properties of an already-constructed - Add `RigidBody::set_mass_properties` to set the mass properties of an already-constructed
rigid-body. rigid-body.
## v0.4.1 ## v0.4.1
- The `RigidBodyBuilder::principal_inertia` method has been deprecated and renamed to - The `RigidBodyBuilder::principal_inertia` method has been deprecated and renamed to
`principal_angular_inertia` for clarity. `principal_angular_inertia` for clarity.
## v0.4.0 ## v0.4.0
- The rigid-body `linvel`, `angvel`, and `position` fields are no longer public. Access using - The rigid-body `linvel`, `angvel`, and `position` fields are no longer public. Access using
their corresponding getters/setters. For example: `rb.linvel()`, `rb.set_linvel(vel, true)`. their corresponding getters/setters. For example: `rb.linvel()`, `rb.set_linvel(vel, true)`.
- Add `RigidBodyBuilder::sleeping(true)` to allow the creation of a rigid-body that is asleep - Add `RigidBodyBuilder::sleeping(true)` to allow the creation of a rigid-body that is asleep
at initialization-time. at initialization-time.
#### Locking translation and rotations of a rigid-body #### Locking translation and rotations of a rigid-body
- Add `RigidBodyBuilder::lock_rotations` to prevent a rigid-body from rotating because of forces. - Add `RigidBodyBuilder::lock_rotations` to prevent a rigid-body from rotating because of forces.
- Add `RigidBodyBuilder::lock_translations` to prevent a rigid-body from translating because of forces. - Add `RigidBodyBuilder::lock_translations` to prevent a rigid-body from translating because of forces.
- Add `RigidBodyBuilder::principal_inertia` for setting the principal inertia of a rigid-body, and/or - Add `RigidBodyBuilder::principal_inertia` for setting the principal inertia of a rigid-body, and/or
@@ -546,6 +656,7 @@ Breaking changes related to events:
contributions should be taken into account in the future too. contributions should be taken into account in the future too.
#### Reading contact and proximity information #### Reading contact and proximity information
- Add `NarrowPhase::contacts_with` and `NarrowPhase::proximities_with` to retrieve all the contact - Add `NarrowPhase::contacts_with` and `NarrowPhase::proximities_with` to retrieve all the contact
pairs and proximity pairs involving a specific collider. pairs and proximity pairs involving a specific collider.
- Add `NarrowPhase::contact_pair` and `NarrowPhase::proximity_pair` to retrieve one specific contact - Add `NarrowPhase::contact_pair` and `NarrowPhase::proximity_pair` to retrieve one specific contact
@@ -554,6 +665,7 @@ Breaking changes related to events:
proximity pairs detected by the narrow-phase. proximity pairs detected by the narrow-phase.
## v0.3.2 ## v0.3.2
- Add linear and angular damping. The damping factor can be set with `RigidBodyBuilder::linear_damping` and - Add linear and angular damping. The damping factor can be set with `RigidBodyBuilder::linear_damping` and
`RigidBodyBuilder::angular_damping`. `RigidBodyBuilder::angular_damping`.
- Implement `Clone` for almost everything that can be worth cloning. - Implement `Clone` for almost everything that can be worth cloning.
@@ -562,34 +674,43 @@ Breaking changes related to events:
- The restitution coefficient of colliders is now taken into account by the physics solver. - The restitution coefficient of colliders is now taken into account by the physics solver.
## v0.3.1 ## v0.3.1
- Fix non-determinism problem when using triangle-meshes, cone, cylinders, or capsules. - Fix non-determinism problem when using triangle-meshes, cone, cylinders, or capsules.
- Add `JointSet::remove(...)` to remove a joint from the `JointSet`. - Add `JointSet::remove(...)` to remove a joint from the `JointSet`.
## v0.3.0 ## v0.3.0
- Collider shapes are now trait-objects instead of a `Shape` enum. - Collider shapes are now trait-objects instead of a `Shape` enum.
- Add a user-defined `u128` to each colliders and rigid-bodies for storing user data. - Add a user-defined `u128` to each colliders and rigid-bodies for storing user data.
- Add the support for `Cylinder`, `RoundCylinder`, and `Cone` shapes. - Add the support for `Cylinder`, `RoundCylinder`, and `Cone` shapes.
- Added the support for collision filtering based on bit masks (often known as collision groups, collision masks, or - Added the support for collision filtering based on bit masks (often known as collision groups, collision masks, or
collision layers in other physics engines). Each collider has two groups. Their `collision_groups` is used for filtering collision layers in other physics engines). Each collider has two groups. Their `collision_groups` is used for
what pair of colliders should have their contacts computed by the narrow-phase. Their `solver_groups` is used for filtering filtering
what pair of colliders should have their contacts computed by the narrow-phase. Their `solver_groups` is used for
filtering
what pair of colliders should have their contact forces computed by the constraints solver. what pair of colliders should have their contact forces computed by the constraints solver.
- Collision groups can also be used to filter what collider should be hit by a ray-cast performed by the `QueryPipeline`. - Collision groups can also be used to filter what collider should be hit by a ray-cast performed by
the `QueryPipeline`.
- Added collision filters based on user-defined trait-objects. This adds two traits `ContactPairFilter` and - Added collision filters based on user-defined trait-objects. This adds two traits `ContactPairFilter` and
`ProximityPairFilter` that allows user-defined logic for determining if two colliders/sensors are allowed to interact. `ProximityPairFilter` that allows user-defined logic for determining if two colliders/sensors are allowed to interact.
- The `PhysicsPipeline::step` method now takes two additional arguments: the optional `&ContactPairFilter` and `&ProximityPairFilter` - The `PhysicsPipeline::step` method now takes two additional arguments: the optional `&ContactPairFilter`
and `&ProximityPairFilter`
for filtering contact and proximity pairs. for filtering contact and proximity pairs.
## v0.2.1 ## v0.2.1
- Fix panic in TriMesh construction and QueryPipeline update caused by a stack overflow or a subtraction underflow. - Fix panic in TriMesh construction and QueryPipeline update caused by a stack overflow or a subtraction underflow.
## v0.2.0 ## v0.2.0
The most significant change on this version is the addition of the `QueryPipeline` responsible for performing The most significant change on this version is the addition of the `QueryPipeline` responsible for performing
scene-wide queries. So far only ray-casting has been implemented. scene-wide queries. So far only ray-casting has been implemented.
- Add `ColliderSet::remove(...)` to remove a collider from the `ColliderSet`. - Add `ColliderSet::remove(...)` to remove a collider from the `ColliderSet`.
- Replace `PhysicsPipeline::remove_rigid_body` by `RigidBodySet::remove`. - Replace `PhysicsPipeline::remove_rigid_body` by `RigidBodySet::remove`.
- The `JointSet.iter()` now returns an iterator yielding `(JointHandle, &Joint)` instead of just `&Joint`. - The `JointSet.iter()` now returns an iterator yielding `(JointHandle, &Joint)` instead of just `&Joint`.
- Add `ColliderDesc::translation(...)` to set the translation of a collider relative to the rigid-body it is attached to. - Add `ColliderDesc::translation(...)` to set the translation of a collider relative to the rigid-body it is attached
to.
- Add `ColliderDesc::rotation(...)` to set the rotation of a collider relative to the rigid-body it is attached to. - Add `ColliderDesc::rotation(...)` to set the rotation of a collider relative to the rigid-body it is attached to.
- Add `ColliderDesc::position(...)` to set the position of a collider relative to the rigid-body it is attached to. - Add `ColliderDesc::position(...)` to set the position of a collider relative to the rigid-body it is attached to.
- Add `Collider::position_wrt_parent()` to get the position of a collider relative to the rigid-body it is attached to. - Add `Collider::position_wrt_parent()` to get the position of a collider relative to the rigid-body it is attached to.