Bevy XPBD v0.5.0
Bevy XPBD 0.5 is the final version of Bevy XPBD, and will be deprecated in favor of Avian, which is coming very, very soon. This release is primarily a Bevy 0.14 upgrade with very few breaking changes to ease migration. Avian 0.1 will have the majority of the changes.
The main changes and improvements in Bevy XPBD 0.5 are:
- Bevy 0.14 support.
- Transform propagation has significantly less overhead, as it is only performed for physics entities.
- Sensor colliders no longer contribute to mass properties.
- 2D heightfields take a
Vec2
instead of a scalar value for scale. - Some bug fixes, like rotation normalization in constraints to prevent explosive behavior.
Migration Guide
Sensor Mass Properties (#381)
Colliders with the Sensor
component no longer contribute to the mass properties of rigid bodies. You can add mass for them by adding another collider that is not a sensor, or by manually adding mass properties with the MassPropertiesBundle
or its components.
Additionally, the mass properties of Sensor
colliders are no longer updated automatically, unless the Sensor
component is removed.
PrepareSet
System Set Order (#380)
Some PrepareSet
system sets have changed order.
Before:
PreInit
PropagateTransforms
InitRigidBodies
InitMassProperties
InitColliders
InitTransforms
Finalize
After:
PreInit
InitRigidBodies
InitColliders
PropagateTransforms
InitMassProperties
InitTransforms
Finalize
ColliderHierarchyPlugin
(#377)
Hierarchy and transform logic for colliders has been extracted from the ColliderBackendPlugin
into a new ColliderHierarchyPlugin
, which by default is included in the PhysicsPlugins
plugin group.
If you are adding plugins manually, make sure you have both if you want that functionality.
What's Changed
- Fix time of impact description in
ShapeHits
by @Jondolf in #340 - Fix 2D heightfield scale and docs by @Jondolf in #343
- Fix 3D ShapeCaster global_rotation by @ramon-oliveira in #344
- Normalize rotations after solving constraints in solver by @Jondolf in #345
- Add feature to examples_common to enable PhysicsDebugPlugin by @jpedrick in #339
- Use
compile_error!
macro instead of panicking inPhysicsLayer
derive macro by @doonv in #347 - Fix some doc tests by @yrns in #354
- various fixes in the
prepare/init_transforms
system by @exoexo-dev in #360 - Implement
RegularPolygon
colliders with a custom shape by @Jondolf in #367 - Update bevy-0.14 branch to crates.io release of nalgebra by @gmorenz in #372
- Speed up
ColliderTransform
propagation and extract collider hierarchy logic intoColliderHierarchyPlugin
by @Jondolf in #377 - Refactor and speed up transform propagation and hierarchies further by @Jondolf in #380
- Make sensors not contribute to mass properties by @Jondolf in #381
- Fix
GlobalTransform
updates for entities with non-physics children by @Jondolf in #392
New Contributors
- @ramon-oliveira made their first contribution in #344
- @jpedrick made their first contribution in #339
- @doonv made their first contribution in #347
- @yrns made their first contribution in #354
- @exoexo-dev made their first contribution in #360
- @gmorenz made their first contribution in #372
Full Changelog: v0.4.0...v0.5.0