Releases: Jondolf/avian
v0.1.2
v0.1.1
A full diff of what has been fixed can be seen here: v0.1.0...v0.1.1
Avian v0.1.0
Avian Physics 0.1 has been released! 🪶
Avian is an ECS-driven physics engine for the Bevy game engine. It is the next evolution of Bevy XPBD, with a completely rewritten contact solver, improved performance, a reworked structure, and numerous other improvements and additions over its predecessor.
See #346 for background on the rebrand.
Highlights
Avian 0.1 has a ton of improvements, additions, and fixes over Bevy XPBD 0.4. Some highlights:
- A solver rewrite: Avian uses an impulse-based TGS Soft solver instead of XPBD for contacts.
- A reworked narrow phase: Collision detection is much more performant and reliable.
- Continuous Collision Detection (CCD): Speculative collision and sweep-based CCD are implemented to prevent tunneling.
- Optional collision margins: Extra thickness can be added for thin colliders such as trimeshes to improve stability and performance.
- Improved performance: Overhead for large scenes is significantly smaller, and collision-heavy scenes can have over a 4-6x performance improvement in comparison to Bevy XPBD.
- Improved runtime collider constructors: It is easier to define colliders and collider hierarchies statically to enable more powerful scene workflows.
- Structural improvements and polish: The module structure has been heavily reworked, and tons of inconsistencies and bugs have been resolved.
- Bevy 0.14 support: Avian supports the latest version of Bevy, and internally, it already takes advantage of new features such as observers and component lifecycle hooks.
Check out the announcement blog post for a more in-depth overview of what has changed and why. A more complete changelog can also be found after the migration guide below.
Migration Guide
Note: This guide is for migration from Bevy XPBD 0.4 to Avian 0.1. The entries for migration to Bevy XPBD 0.5 (an easier migration path) still apply and are also listed here.
New Contact Solver #385
The contact solver has been rewritten. In practice, this has the following effects:
- Collisions should be much more stable.
- Resolving overlap is no longer nearly as explosive.
- Less substeps are generally needed for stability.
- Tunneling is much more rare.
- Performance is better.
However:
- Contacts may even be too soft by default for some applications. This can be tuned with the
SolverConfig
resource. - Static friction is currently not considered separately from dynamic friction. This may be fixed in the future.
- Restitution might not be quite as perfect in some instances (this is a tradeoff for speculative collision to avoid tunneling).
- 2D applications may need to configure the
PhysicsLengthUnit
to get the best stability and behavior.
The PhysicsLengthUnit
can be thought of a pixels-per-meter scaling factor for the engine's internal length-based tolerances and thresholds, such as the maximum speed at which overlap is resolved, or the speed threshold for allowing bodies to sleep. It does not scale common user-facing inputs or outputs like colliders or velocities.
To configure the PhysicsLengthUnit
, you can insert it as a resource, or simply set it while adding PhysicsPlugins
:
fn main() {
App::new()
.add_plugins((
DefaultPlugins,
// A 2D game with 20 pixels per meter
PhysicsPlugins::default().with_length_unit(20.0),
))
.run();
}
Collider
Constructor Argument Order #394
To match Bevy's Cylinder
, Capsule
, and Cone
, the order of arguments has changed for some Collider
constructors.
- Use
Collider::cylinder(radius, height)
instead ofCollider::cylinder(height, radius)
. - Use
Collider::capsule(radius, height)
instead ofCollider::capsule(height, radius)
. - Use
Collider::capsule_endpoints(radius, a, b)
instead ofCollider::capsule_endpoints(a, b, radius)
. - Use
Collider::cone(radius, height)
instead ofCollider::cone(height, radius)
.
This is a very heavily breaking change, but I believe it is important that we align ourselves with Bevy here, and it's better to do it sooner rather than later.
AsyncCollider
and AsyncSceneCollider
#378
AsyncCollider
, AsyncSceneCollider
, and ComputedCollider
have been replaced by more powerful ColliderConstructor
and ColliderConstructorHierarchy
types. They work similarly, but also support primitive shapes and arbitrary hierarchies, not just colliders computed for meshes and scenes.
Additionally, some naming changes have been made to improve consistency, such as renaming TriMesh
to Trimesh
to be consistent with Collider::trimesh
.
- Remove feature
async-collider
. If you need to use computed shapes, use the featurecollider-from-mesh
. If you depend onColliderConstructorHierarchy
waiting for a scene to load, use the featurebevy_scene
- Remove
AsyncCollider
and useColliderConstructor
directly - Rename
AsyncSceneCollider
toColliderConstructorHierarchy
- Rename
AsyncSceneCollider::default_shape
toColliderConstructorHierarchy::default_constructor
- Rename
AsyncSceneCollider::meshes_by_name
toColliderConstructorHierarchy::config
- Rename
AsyncSceneCollider::with_shape_for_name
toColliderConstructorHierarchy::with_constructor_for_name
- Rename
AsyncSceneCollider::without_shape_for_name
toColliderConstructorHierarchy::without_constructor_for_name
- Rename
- Rename
AsyncSceneColliderData
toColliderConstructorHierarchyConfig
- Rename
AsyncSceneColliderData::shape
toColliderConstructorHierarchyConfig::constructor
- Rename
- Rename
ComputedCollider
toColliderConstructor
.- Rename
ComputedCollider::TriMesh
toColliderConstructor::TrimeshFromMesh
- Rename
ComputedCollider::TriMeshWithFlags
toColliderConstructor::TrimeshFromMeshWithConfig
- Rename
ComputedCollider::ConvexHull
toColliderConstructor::ConvexHullFromMesh
- Rename
ComputedCollider::ConvexDecomposition
toColliderConstructor::ConvexDecompositionFromMeshWithConfig
- Rename
- Rename
VHACDParameters
toVhacdParameters
- Rename
Collider::halfspace
toCollider::half_space
Reworked Module Structure #370
- The internal module structure has changed significantly, and types have moved around. Most imports from the
prelude
should work like before, but explicit import paths may be broken. - The
PhysicsSetupPlugin
has been split intoPhysicsSchedulePlugin
andPhysicsTypeRegistrationPlugin
.
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.
Joints and Custom Constraints #390 and #385
SphericalJoint
no longer exists in 2D. UseRevoluteJoint
instead.AngleLimit
propertiesalpha
andbeta
are now namedmin
andmax
.apply_positional_correction
has been renamed toapply_positional_lagrange_update
. There is also anapply_positional_impulse
method.apply_angular_correction
has been renamed toapply_angular_lagrange_update
. There is also anapply_angular_impulse
method.compute_lagrange_update
no longer takes a slice over gradients. For that, usecompute_lagrange_update_with_gradients
.Joint::align_orientation
has been moved toAngularConstraint
.- XPBD traits and systems are now located in the
dynamics::solver::xpbd
module. - User constraints should run
solve_constraints
inSubstepSolverSet::SolveUserConstraints
instead ofSubstepSet::SolveUserConstraints
.
Scheduling Changes #385 and #380
Several scheduling internals have been changed. For example:
- The narrow phase and
PostProcessCollisions
schedule are now run inPhysicsStepSet::NarrowPhase
instead ofSubstepSet::NarrowPhase
. - Integration is now run in
IntegrationSet::Velocity
andIntegrationSet::Position
instead ofSubstepSet::Integrate
. SubstepSet
has been removed.- The solver runs in
PhysicsStepSet::Solver
. - The solver's system sets are in
SolverSet
. - Substepping is performed in
SolverSet::Substep
. - The substepping loop's system sets are in
SubstepSolverSet
.
- The solver runs in
Systems running in PostProcessCollisions
may need to be modified to account for it being moved outside of the substepping loop.
Some PrepareSet
system sets have also 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 `ColliderHierarchy...
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
Bevy XPBD v0.4.0
Bevy XPBD 0.4 features several new features, bug fixes, and quality of life improvements. Here are some highlights:
- Generic colliders: Bevy XPBD no longer relies on just
Collider
for collision detection. You can implement custom collision backends! - Parry and Nalgebra are optional: The Parry and Nalgebra dependencies are now behind feature flags (enabled by default). If you don't need collision detection or have a custom collision backend, you can disable them!
- Access contact impulses: It is often useful to know how strong collisions are. This information is now available in
Collision
events and theCollisions
resource. - Debug render contacts: Contact normals and impulses can now be debug rendered.
- Layer rework: Collision layers have been reworked to be more versatile and explicit with less footguns.
- Bevy 0.13 support: Bevy XPBD has been updated to the latest version of Bevy.
- Colliders from primitives: Colliders can be created from the new geometric primitives introduced in Bevy 0.13.
PhysicsGizmos
gizmo config group: Debug rendering has its own gizmo configuration instead of using the global configuration.
Check out the announcement blog post for a more in-depth overview of what's changed and why. A more complete changelog can also be found after the migration guide below.
Migration Guide
Default Features (#327)
The default Collider
now requires either the parry-f32
or parry-f64
feature depending on the precision you are using for Bevy XPBD. However, if you don't need colliders or have a custom collision backend, you can leave the feature disabled.
Layer Rework (#313)
Collision layers have been reworked, see #313.
- Groups are now called memberships and masks are called filters. This also matches Rapier's naming.
- Memberships and filters use a type called
LayerMask
, which is a bitmask for layers and a newtype foru32
. - All methods like
add_group
,remove_mask
, and so on have been removed. Instead, modify the properties directly.
let layers1 = CollisionLayers::new(0b00010, 0b0111);
let layers2 = CollisionLayers::new(GameLayer::Player, [GameLayer::Enemy, GameLayer::Ground]);
let layers3 = CollisionLayers::new(LayerMask(0b0001), LayerMask::ALL);
Modifying layers is now done by modifying the memberships or filters directly:
layers.memberships.remove(GameLayer::Environment);
layers.filters.add([GameLayer::Environment, GameLayer::Tree]);
// Bitwise ops also work since we're accessing the bitmasks/layermasks directly.
layers.memberships |= GameLayer::Player; // You could also use a bitmask like 0b0010.
Debug rendering
The PhysicsDebugConfig
resource and PhysicsDebugRenderer
system parameter have been removed in favor of the new PhysicsGizmos
gizmo configuration group.
Before:
fn main() {
App::new()
.add_plugins((
DefaultPlugins,
PhysicsPlugins::default(),
PhysicsDebugPlugin::default(),
))
// Configure physics debug rendering
.insert_resource(PhysicsDebugConfig {
aabb_color: Some(Color::WHITE),
..default()
})
.run();
}
After:
fn main() {
App::new()
.add_plugins((
DefaultPlugins,
PhysicsPlugins::default(),
PhysicsDebugPlugin::default(),
))
// Configure physics debug rendering
.insert_gizmo_group(
PhysicsGizmos {
aabb_color: Some(Color::WHITE),
..default()
},
GizmoConfig::default(),
)
.run();
}
This also allows you to configure e.g. line width for just physics gizmos by configuring their GizmoConfig
.
Renamed Collider
constructors (#326)
- Replace
Collider::ball
withCollider::circle
in 2D andCollider::sphere
in 3D - Replace
Collider::cuboid
withCollider::rectangle
in 2D
Ray and shape casting (#329)
For spatial queries, replace Vec2
/Vec3
directions with Direction2d
/Direction3d
.
// Before
let caster = RayCaster::new(Vec3::ZERO, Vec3::X);
// After
let caster = RayCaster::new(Vec3::ZERO, Direction3d::X);
This applies to RayCaster
, ShapeCaster
, SpatialQuery
methods like cast_ray
, and many other methods that use directions.
What's Changed
- docs: Fix incorrect docs for mass component auto-initialization by @johanhelsing in #234
- Don't overwrite schedules when adding plugin by @johanhelsing in #236
- Take child collider rotation into account for contact normals by @Jondolf in #238
- Fix mesh visibility not being reset when physics debug is disabled by @Jondolf in #242
- Filter collisions between children of the same rigidbody in broad phase by @mbrea-c in #241
- Added variant TriMeshWithFlags to ComputedCollider, fix #248 by @Adamkob12 in #251
- Fix rotations when center of mass is offset by @mbrea-c in #250
- Use any_orthogonal_vector to get orthogonal vector by @ollef in #255
- Fix tests and doc examples, make
cargo test
compile by @Jondolf in #267 - fix: make
clear_forces_and_impulses
public by @ActuallyHappening in #257 - Scale debug rendering of center of mass dot by axis lengths by @Jondolf in #268
- docs: Added Character Controller recommendation for Bevy Tnua what supports Bevy XPBD by @dror-g in #270
- Fix
Rotation
change detection triggering every frame by @Jondolf in #272 - Don't overwrite
Time<Physics>
whenPhysicsPlugins
are added by @johanhelsing in #276 - Implement
MapEntities
forAabbIntervals
by @johanhelsing in #275 - Implement
MapEntities
for collider components by @johanhelsing in #277 - Apply scale in
Collider::set_shape
by @Jondolf in #278 - Fix dead custom constraints link in docs by @PerryPeak in #280
- Ignore static-static collisions in broad phase by @Jondolf in #283
- Fix rotation change detection in integrator by @Jondolf in #284
- Fix static body handling in
update_aabb_intervals
by @Jondolf in #285 - Fix
DistanceJoint
distance limits by @Jondolf in #286 - Preserve collisions between inactive entities, add sensor example by @TeamDman in #266
- docs: use the read function for iterating over events by @tremorris1999 in #290
- docs: corrects other outdated calls to .iter by @tremorris1999 in #291
- Fix
Time
inconsistency after substepping loop by @Jondolf in #294 - Make PreparePlugin configurable by @Rigidity in #292
- Adding Collider::round_cuboid by @kav in #300
- Add section about camera following jitter to FAQ by @Jondolf in #305
- Add intersection and point queries to
Collider
by @Jondolf in #307 - Debug render contact normals by @Jondolf in #308
- Implement cast_ray_predicate to allow filtering the colliders with a function by @Affinator in #297
- Fix colliders without
RigidBody
not working by @Jondolf in #323 - fix raycast does not follow entity transform without rigidbody by @zwazel in #310
- Store impulses in contacts and refactor contact data by @Jondolf in #324
- Add
ColliderBackendPlugin
and support generic colliders by @Jondolf in #311 - Rework layers by @Jondolf in #313
- Make
Collider
optional, allowing usage without Parry or Nalgebra by @Jondolf in #327 - Fix doc examples by @Jondolf in #330
- Update to Bevy 0.13 by @Jondolf in #315
New Contributors
Bevy XPBD v0.3.0
0.3 is a huge release with tons of new features, bug fixes, and quality of life improvements, especially for collision detection. Here are some highlights:
- Modular narrow phase: Narrow phase collision detection has been refactored into modular plugins instead of being tightly coupled with the solver
- Improved contact stability: Collisions are significantly more stable, and dynamic friction has been fixed to handle different masses correctly
- Collider scale: Colliders can be scaled using
Transform
- Child colliders: Colliders can be freely nested using entity hierarchies
- Async colliders: Colliders can be automatically generated from meshes and glTF scenes
- Accessing, modifying and filtering collision: The new
Collisions
resource can be used for accessing and modifying contacts in custom systems Transform
for positions:Transform
can be used instead of the internalPosition
andRotation
components- Debug rendering: Physics objects and interactions can be rendered for debugging purposes
- Dominance: Dynamic bodies can be configured to have infinite mass relative to bodies with a lesser dominance
- Bevy 0.12 support: Bevy XPBD has been updated to Bevy 0.12
- Time unification: Timing and scheduling resources have been replaced by the unified
Time<Physics>
andTime<Substeps>
resources
Read the more complete changelog after the migration guide for more details.
Migration guide
Here is a (non-exhaustive) migration guide for migrating from 0.2 to 0.3.
Collision iteration
Before:
fn my_system(mut collision_event_reader: EventReader<Collision>) {
for Collision(contact) in collision_event_reader.iter() {
println!("Penetration depth: {}", contact.penetration);
}
}
After:
fn my_system(mut collision_event_reader: EventReader<Collision>) {
for Collision(contacts) in collision_event_reader.read() {
for manifold in contacts.manifolds.iter() {
for contact in manifold.contacts.iter() {
println!("Penetration depth: {}", contact.penetration);
}
}
}
}
This is more verbose, but it provides multiple contact points instead just one. In the future, this will hopefully be made more ergonomic with helper methods.
A new and more powerful Collisions
resource was also added. It can be used to achieve a similar result.
Collider scale (#189)
Before:
let mesh = meshes.add(Mesh::from(shape::Cube { size: 1.0 }));
commands.spawn((
PbrBundle {
mesh,
transform: Transform::from_scale(Vec3::new(10.0, 1.0, 10.0)),
..default()
},
// Collider isn't scaled by transform
Collider::cuboid(10.0, 1.0, 10.0),
RigidBody::Static,
));
After:
let mesh = meshes.add(Mesh::from(shape::Cube { size: 1.0 }));
commands.spawn((
PbrBundle {
mesh,
transform: Transform::from_scale(Vec3::new(10.0, 1.0, 10.0)),
..default()
},
// Collider size takes transform scale into account
Collider::cuboid(1.0, 1.0, 1.0),
RigidBody::Static,
));
Collider creation from meshes
trimesh_from_bevy_mesh
→trimesh_from_mesh
convex_decomposition_from_bevy_mesh
→convex_decomposition_from_mesh
Unified time (#214)
- Replace every
DeltaTime
inPhysicsSchedule
and everySubDeltaTime
inSubstepSchedule
withTime
, elsewhere explicitly useTime<Physics>
andTime<Substep>
- When advancing physics manually, instead of setting
DeltaTime
, advance theTime<Physics>
clock usingtime.advance_by(...)
- Replace
PhysicsTimestep
withTime::new_with(Physics::fixed_hz(...))
and so on - Replace
PhysicsLoop::pause/resume
withTime::<Physics>::pause/unpause
- Replace
PhysicsLoop::step
with advancing the physics clock usingTime::<Physics>::advance_by
- Replace
PhysicsTimescale
usage withTime::<Physics>::with/set_relative_speed
What's Changed
- Debug render colliders by @Jondolf in #73
- Add more global and entity-level debug render options by @Jondolf in #74
- Add debug rendering axes and joints and improve configuration API by @Jondolf in #76
- Move
SpatialQuery
methods toSpatialQueryPipeline
by @LeshaInc in #77 - Add
enabled
flag toPhysicsDebugConfig
to globally disable debug rendering at runtime by @LeshaInc in #78 - Add
trimesh_with_flags
andtrimesh_from_bevy_mesh_with_flags
by @Jondolf in #79 - Add PhysicsTimescale resource for slow-motion or fast-forward simulation by @dasisdormax in #80
- Use world-space center of mass in penetration constraint by @Jondolf in #81
- Add
clear
methods for ray and shape hits and clear the hits on disable by @Jondolf in #82 - Expand AABBs only in the movement direction by @Jondolf in #83
- Improve simulation stability when object are far from world origin by @LeshaInc in #84
- Add back global contact positions by @Jondolf in #86
- Run transform propagation before
init_rigid_bodies
. Fixes #88 by @LeshaInc in #89 - Add criterion benchmarks by @LeshaInc in #91
- Setup
PhysicsSchedule
andSubstepSchedule
to use single-threaded executor by @LeshaInc in #92 - Use contact manifolds instead of single contacts for collisions by @Jondolf in #90
- Add
ExternalImpulse
andExternalAngularImpulse
by @Jondolf in #95 - Filter operation reodered for a little performance boost by @TrustNoOneElse in #98
- Store local contact normals and transform them into world-space at each solve by @Jondolf in #97
- Support
Transform
for moving and positioning bodies by @Jondolf in #96 - Fix typo in docs by @Zentropivity in #103
- Automatically add
Position
andRotation
for colliders by @Jondolf in #101 - Separate narrow phase from solver into
NarrowPhasePlugin
by @Jondolf in #100 - feature: Add DistanceJoint and 2D and 3D examples. by @shanecelis in #105
- Debug render rigid body axes at center of mass by @Jondolf in #109
- Added text that explained how to use the example 'chain_3d' by @Aztro-dev in #107
- Add "Bounciness" and "Elasticity" aliases for
Restitution
by @Jondolf in #117 - Clamp coefficient of restitution between 0 and 1 and improve restitution docs by @Jondolf in #118
- Add
current_position
getter forRigidBodyQueryItem
by @Jondolf in #120 - Remove solver iteration loop by @Jondolf in #121
- Clarify that external forces and impulses are local (edit: not true, fixed by #144) by @Jondolf in #123
- Register
CoefficientCombine
by @grace125 in #126 - Correct time dilation for FixedUpdate schedule. by @starwolfy in #128
- Fix center of mass and inertia computations and add tests by @Jondolf in #127
- add Rotation::from_sin_cos constructor by @RJ in #130
- Avoid allocate on spatial queries. ray_hits_callback, shape_hits_callback, intersections_callback by @bnyu in #133
- Dynamic friction fix by @felixbjorkeson in #52
- Fix 2d
position_to_transform
changing childTransform
z-component by @ShaddowSpy in #134 - Make Rotation & PreviousRotation derive PartialEq by @RJ in #136
- Fix tests on mac m1 by @RJ in #138
- Register/Reflect Component of Sensor by @grace125 in #141
- Fix
Transform
initialization for children and refactorprepare.rs
by @Jondolf in #140 - Clarify that forces are in world space and improve force docs by @Jondolf in #144
- Fix math cross-platform determinism by @Jondolf in #145
- Combine
insert
calls into bundles to reduce archetype count by @Jondolf in #151 - Avoid incremental updates to Qbvh by @NiseVoid in #152
- Fix contact stability for non-convex colliders by @Jondolf in #156
- Collision post processing by @datael in #155
- Add
Trigger
alias forSensor
and improveSensor
docs by @Jondolf in #160 - Make
PreviousGlobalTransform
public and derive traits by @Jondolf in #166 - Add contact queries by ...
Bevy XPBD v0.2.0
Biggest features and changes
- Added spatial queries: Ray casting, shape casting, point projection, intersection tests
- Updated to Bevy 0.11
- Improved scheduling and system sets
PhysicsPlugins
accepts any schedule for running thePhysicsSchedule
- Added
PhysicsTimestep::FixedOnce
- Simplified system sets
- Added
LinearDamping
andAngularDamping
- Added
GravityScale
- Improved force and torque API, e.g.
persistence
property andapply_at_point
- Added
LockedAxes
- Added basic dynamic and kinematic character controller examples
- Improved docs
- Added short section on server usage
- Added comparison to Rapier in FAQ
- Improved XPBD explanation a bit
- A lot of bug fixes
What's Changed
- Add spatial queries by @Jondolf in #53
- Add
collider-from-mesh
feature and makebevy_render
optional by @Jondolf in #55 - Add
LinearDamping
andAngularDamping
by @Jondolf in #56 - Add
GravityScale
component by @Jondolf in #57 - Support applying force at point and automatically clearing external force and torque by @Jondolf in #58
- Use entity index for QBVH nodes instead of entity bits by @Jondolf in #59
- Use masks instead of collision layers for
SpatialQueryFilter
by @Jondolf in #61 - Rename
CollisionLayers
methodswith_group
,without_group
etc. toadd_group
,remove_group
by @Jondolf in #62 - Support multiple hits for shape casts by @Jondolf in #63
- Add
LockedAxes
by @Jondolf in #64 - Add PhysicsTimestep mode to run only once with a fixed delta by @NiseVoid in #60
- Implement Debug for Collider by @DanielHZhang in #65
- Update to Bevy 0.11 by @Jondolf in #66
- Improve scheduling and system sets by @Jondolf in #68
- Fixes for spatial queries by @Jondolf in #70
- Add basic dynamic and kinematic character controller examples by @Jondolf in #71
- Improved docs by @Jondolf in #72
New Contributors
- @NiseVoid made their first contribution in #60
- @DanielHZhang made their first contribution in #65
Full Changelog: v0.1.0...v0.2.0
Bevy XPBD v0.1.0
Release 0.1.0