Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions migration-guides/0.4-to-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ since the latest release. These guides are evolving and may not be polished yet.

See [migration-guides/README.md](./README.md) and existing entries for information about Avian's
migration guide process and what to put here.

## `ReadRigidBody` and `WriteRigidBody`

PR [#908](https://github.com/avianphysics/avian/pull/908) introduced two new traits: `ReadRigidBody` and `WriteRigidBody`, and `RigidyBodyForces` is now defined as:

```rust
pub trait RigidBodyForces: ReadRigidBodyForces + WriteRigidBodyForces {}
```

In most cases this should just work, but if it doesn't, you can replace your implementation for `RigidBodyForces` with both `ReadRigidBodyForces` and `WriteRigidBodyForces` where it is used / needed. Both traits are required to implement `RigidBodyForces`, but you can implement them separately.
2 changes: 1 addition & 1 deletion src/dynamics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub mod prelude {
forces::{
ConstantAngularAcceleration, ConstantForce, ConstantLinearAcceleration,
ConstantLocalForce, ConstantLocalLinearAcceleration, ConstantTorque, ForcePlugin,
ForceSystems, Forces, RigidBodyForces,
ForceSystems, Forces, ReadRigidBodyForces, RigidBodyForces, WriteRigidBodyForces,
},
mass_properties::{
MassPropertiesExt, MassPropertyHelper, MassPropertyPlugin,
Expand Down
5 changes: 4 additions & 1 deletion src/dynamics/rigid_body/forces/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ mod query_data;
mod tests;

pub use plugin::{ForcePlugin, ForceSystems};
pub use query_data::{Forces, ForcesItem, NonWakingForcesItem, RigidBodyForces};
pub use query_data::{
Forces, ForcesItem, NonWakingForcesItem, ReadRigidBodyForces, RigidBodyForces,
WriteRigidBodyForces,
};

use crate::prelude::*;
use bevy::prelude::*;
Expand Down
Loading