Releases: avianphysics/avian
v0.6.0-rc.1
A full diff of what's in the release candidate can be seen here: v0.5.0...v0.6.0-rc.1
Avian v0.5.0
Avian Physics 0.5 has been released! 🪶
Avian 0.5 is just an update to Bevy 0.18, with no other breaking changes. See Bevy's own release notes for more details.
This was the first release under our new release process, where we publish Bevy version updates separately from feature releases, to unblock users and third party crates that want to migrate to the latest Bevy release early. A separate Avian 0.6 feature release with new functionality and improvements will be published when it is ready.
See the Avian 0.5 announcement post for more details.
v0.4.1
What's Changed
- Implement trimesh builder by @janhohenheim in #866
- Store migration guides in the repository by @Jondolf in #867
- Rename
C-Breaking-ChangetoM-Migration-Guideby @Jondolf in #870 - Fix issue with
RayCasterwhen max_hits is set to 1 by @LlamaLamp in #869 - Fix
init_physics_transformrunning twice and breaking scene hierarchies by @Jondolf in #873 - Prune manifolds without points by @kristoff3r in #879
- Fix locked axes for angular impulses by @Jondolf in #881
- Update 3D character examples link by @ostin-r in #878
- Fix panic when despawning joints after despawning their bodies by @Jondolf in #882
New Contributors
- @LlamaLamp made their first contribution in #869
- @ostin-r made their first contribution in #878
Full Changelog: v0.4.0...v0.4.1
Avian v0.4.0
Avian Physics 0.4 has been released! 🪶
Highlights
Avian 0.4 is the biggest release yet, with several new features, quality-of-life improvements, and important bug fixes. Highlights include:
- Massive performance improvements: Avian is 3x as fast as before, with much better scaling for multi-core hardware.
- Solver bodies: The solver stores bodies in a much more efficient format optimized for cache locality and future wide SIMD support.
- Graph coloring: The constraint solver is now multi-threaded with graph coloring.
- Simulation islands: Islands are used for a much improved sleeping and waking system, reducing overhead for large game worlds with many resting bodies.
- Force overhaul: The force and impulse APIs have been redesigned from the ground up, providing a much more capable and intuitive interface.
- Joint Improvements: Joints now support full reference frames (anchor + basis), and have new
JointDampingandJointForcescomponents. - Voxel colliders: Avian now supports voxel colliders for efficient representation of Minecraft-like worlds and other volumetric data.
- Bevy 0.17 support: Avian has been updated to the latest version of Bevy, and has changed its collision event types and system set naming to match.
- Contact API improvements: Contact data now provides access to world-space points, normal speeds, and more accurate contact impulses.
- Benchmarking CLI: Avian has a new CLI tool for benchmarking various scenes and profiling multi-threaded scaling.
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
Bevy 0.17 #815
Avian 0.4 migrates Avian to Bevy 0.17. This involves some breaking changes.
Collision Events
The CollisionStarted, CollisionEnded, OnCollisionStart, and OnCollisionEnd events have been replaced by the CollisionStart and CollisionEnd events. They are both written as a Message and triggered as an Event, and store the collider and body entity of both colliders involved in the event.
A collision event observer before:
fn on_player_stepped_on_plate(event: Trigger<OnCollisionStart>, player_query: Query<&Player>) {
let pressure_plate = event.target();
let other_entity = event.collider;
if player_query.contains(other_entity) {
println!("Player {other_entity} stepped on pressure plate {pressure_plate}");
}
}and after:
fn on_player_stepped_on_plate(event: On<CollisionStart>, player_query: Query<&Player>) {
let pressure_plate = event.collider1;
let other_entity = event.collider2;
if player_query.contains(other_entity) {
println!("Player {other_entity} stepped on pressure plate {pressure_plate}");
}
}A collision event reader system before:
fn print_started_collisions(mut collision_reader: EventReader<CollisionStarted>) {
for CollisionStarted(collider1, collider2) in collision_reader.read() {
println!("{collider1} and {collider2} started colliding");
}
}and after:
fn print_started_collisions(mut collision_reader: MessageReader<CollisionStart>) {
// Note: The event now also stores `body1` and `body2`
for event in collision_reader.read() {
println!("{} and {} started colliding", event.collider1, event.collider2);
}
}System Sets
System sets have been renamed to follow the new FooSystems naming convention.
PhysicsSet→PhysicsSystemsPhysicsStepSet→PhysicsStepSystemsSubstepSet→SubstepSystemsSubstepSolverSet→SubstepSolverSystemsSolverSet→SolverSystemsIntegrationSet→IntegrationSystemsBroadPhaseSet→BroadPhaseSystemsNarrowPhaseSet→NarrowPhaseSystemsSweptCcdSet→SweptCcdSystemsPhysicsTransformSet→PhysicsTransformSystems
ColliderConstructorHierarchy
Bevy 0.17 changed the way Name works for glTF mesh primitives (migration guide). Instead of MeshName.PrimitiveIndex, it is now in the form of MeshName.MaterialName. This also means that APIs such as ColliderConstructorHierarchy::with_constructor_for_name now use this format.
ColliderConstructorHierarchy::new(ColliderConstructor::ConvexDecompositionFromMesh)
.with_density_for_name("armL_mesh.ferris_material", 3.0)
.with_density_for_name("armR_mesh.ferris_material", 3.0)Force Overhaul #770
Avian 0.4 overhauls the force APIs, and removes the ExternalForce, ExternalTorque, ExternalImpulse, and ExternalAngularImpulse components.
- For persistent forces and torques, use the new
ConstantForceandConstantTorquecomponents. - For non-persistent forces that get cleared automatically, use the new
ForceshelperQueryData. - Impulses can no longer be persistent. Use persistent forces instead.
The new ForcePlugin must be enabled for forces to function properly. It is included in PhysicsPlugins by default.
Joints #517, #735, #799, #803
Avian 0.4 contains a lot of changes and improvements for joints.
Core APIs
- Joint APIs are now in
dynamics::jointsinstead ofdynamics::solver::joints - The
Jointtrait has been removed in favor of theEntityConstrainttrait and helper methods on the joint types themselves - Renamed
entity1andentity2tobody1andbody2 - Renamed
free_axistoslider_axisforPrismaticJoint - Renamed
aligned_axistohinge_axisforRevoluteJoint - Renamed
with_local_anchor_1,with_local_anchor_2,local_anchor_1, andlocal_anchor_2towith_local_anchor1,with_local_anchor2,local_anchor1, andlocal_anchor2 - The
local_anchor1andlocal_anchor2methods now return anOption - The
FixedJoint,PrismaticJoint,RevoluteJoint, andSphericalJointnow store a fullJointFrame(anchor + basis) for each body instead of just local anchors - Removed
swing_axisfromSphericalJoint; just set thetwist_axis, and the swing limit cone will be oriented accordingly - Removed damping properties and methods from joint types in favor of the
JointDampingcomponent - Removed force properties and methods from joint types in favor of the
JointForcescomponent - Each part of a joint has its own compliance and helpers for it, such as
with_point_complianceandwith_swing_compliance.
Only One Joint Per Entity
Entities can now only hold up to one type of joint component. If a joint is added on an entity that already has a joint, the old joint is automatically removed, and a warning is emitted if debug_assertions are enabled. A rigid body can still be attached to other bodies by multiple joints, but each joint must be on its own entity.
ContactEdge now also stores the rigid body entities.
Remove DistanceJoint::rest_length
The rest_length property of DistanceJoint has been removed in favor of just using length_limits.
- Replace
DistanceJoint::with_rest_length(1.0)withDistanceJoint::with_limits(1.0, 1.0). - Replace
joint.rest_length = 1.0withjoint.length_limits = 1.0.into().
Solver Reorganization and XPBD
- XPBD logic is now contained within
dynamics::solver::xpbd, gated behind thexpbd_jointsfeature - XPBD system sets from
SubstepSolverSethave been extracted to a separateXpbdSolverSystemsenum - XPBD systems are now initialized by an
XpbdSolverPlugin
Custom XPBD Constraints
- The
XpbdConstrainttrait now has apreparestep to prepare base translational and rotational offsets and any other pre-step data. XpbdConstraintnow has aSolverDataassociated type for a solver data component implementing theXpbdConstraintSolverDatatrait. This is taken byprepareandsolve.XpbdConstraint::solveand many related methods now useSolverBodyandSolverBodyInertiastructs. Positional corrections are applied to thedelta_positionanddelta_rotationproperties. Updated positional information can be computed based on the pre-step data and these deltas.apply_positional_lagrange_updatehas been removed. Useapply_positional_impulseinstead.xpbd::solve_constraintis nowxpbd::solve_xpbd_joint, and only supports two entities (make your own system if you need more).- Most methods that previously returned forces or torques now return Lagrange multiplier updates.
- See the
custom_constraintexample for a functional demonstration of implementing a custom constraint.
Contact APIs #771, #788
Contact Impulses
ContactPoint::normal_impulse previously corresponded to the clamped accumulated normal impulse from the last substep, used for warm starting the contact solver. It did not represent the total impulse applied across substeps and restitution, despite the ambiguous name.
Now, ContactPoint::normal_impulse works like you would expect, and represents the total normal impulse applied at a contact point. Divide by the time step to get the corresponding force.
The old warm starting impulses are now stored as warm_start_normal_impulse and warm_start_tangent_impulse (previously tangent_impulse).
The method APIs such as total_normal_impulse, total_normal_impulse_magnitude, and max_normal_impulse have been updated accordingly to use the new normal_impulse. Additionally, ContactPair::max_normal_impulse has be...
v0.3.1
Avian v0.3.0
Avian Physics 0.3 has been released! 🪶
Highlights
Avian 0.3 is another huge release, with several new features, quality-of-life improvements, and important bug fixes. Highlights include:
- Opt-in contact reporting: Collision events are now only sent for entities that have the
CollisionEventsEnabledcomponent, reducing unwanted overhead and iteration. - Observable collision events: Observers finally support collision events, making it easy to define per-entity collision handlers.
- Collision hooks: Users can "hook into" the collision pipeline, making it possible to efficiently filter and modify contacts.
- Per-manifold material properties: Friction, restitution, and tangent velocity can be modified for contact manifolds, allowing the simulation of non-uniform materials and conveyor belts.
- Collider context: Custom colliders that implement
AnyColliderhave aContextfor ECS access. - Physics diagnostics: Avian has built-in diagnostics and a debug UI for runtime physics profiling.
- Reworked contact pair management: Contacts have been massively reworked to reduce allocations and unnecessary work while increasing parallelism.
- Faster collisions and spatial queries: Collisions and spatial queries have much less overhead.
- Bevy 0.16 support: Avian has been updated to the latest version of Bevy, and is taking advantage of relationships for attaching colliders to rigid bodies.
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
Collision Hooks #610
The BroadPhasePlugin, NarrowPhasePlugin, and many NarrowPhase methods now take generics for CollisionHooks. If you have no collision hooks, you can use ().
Physics Picking #632
The RenderLayers of cameras and collider entities no longer affect physics picking. Add the new PhysicsPickingFilter component to cameras to control which CollisionLayers and colliders are included in picking.
Default Layers for ColliderConstructorHierarchy #649
ColliderConstructorHierarchy now defaults to one membership (the first layer) and all filters for the CollisionLayers of generated colliders. This is consistent with how the CollisionLayers component already works normally.
Previously, it was still using the old default of all memberships and all filters.
Improved Contact Types #616 #685
There have been several changes to Avian's contact types to make them more optimized and clear.
Contacts
Contactshas been renamed toContactPair.- The
total_normal_impulseproperty has been replaced with atotal_normal_impulsehelper method. - The
total_normal_forcehelper has been deprecated. Instead, just divide the impulse by the substep timestep. - The
total_tangent_impulseproperty andtotal_friction_forcehelper have been removed for being inaccurate/misleading. The tangent impulse magnitudes of each individual point can still be accessed.
ContactManifold
ContactManifold::contactshas been renamed toContactManifold::points.- The local
normal1andnormal2have been replaced with a single world-spacenormal, pointing from the first shape to the second.
ContactData
ContactDatahas been renamed toContactPoint, since it specifically represents a point in a contact manifold, not general contact data.point1andpoint2have been renamed tolocal_point1andlocal_point2for explicitness.normal1andnormal2have been removed, since the normal is already stored in theContactManifold.
Add Context to AnyCollider #665
AnyColliderimplementors now need to specify aContextassociatedSystemParam. If this is unnecessary,()should be used.- When trying to use methods from
AnyCollideron an implementation with()context,SimpleCollidershould be used instead. - Methods on
AnyColliderhave been suffixed with_with_context.
Bevy 0.16 Support #670
Avian now uses Bevy 0.16.
The AncestorMarkerPlugin no longer requires a schedule or system set.
Change ColliderParent to ColliderOf relationship #671
The ColliderParent component has been renamed to ColliderOf, and it is now a Relationship. The ColliderHierarchyPlugin (included in PhysicsPlugins) must be enabled for colliders to be automatically attached to rigid bodies, but ColliderOf can also be inserted manually otherwise.
The transform management in ColliderHierarchyPlugin has been extracted into a new ColliderTransformPlugin. The ColliderHierarchyPlugin no longer takes a schedule.
Reworked Contact Pair Management #683
Avian's collision detection pipelines and contact pair management have been massively reworked for better performance and robustness.
PostProcessCollisions
The PostProcessCollisions schedule and NarrowPhaseSet::PostProcess system set have been removed, as it is incompatible with new optimizations to narrow phase collision detection. Instead, use CollisionHooks for contact modification.
Contact Reporting
The ContactReportingPlugin and PhysicsStepSet::ReportContacts system set have been removed. Contact reporting is now handled by the NarrowPhasePlugin directly.
The Collision event no longer exists. Instead, use Collisions directly, or get colliding entities using the CollidingEntities component.
The CollisionStarted and CollisionEnded events are now only sent if either entity in the collision has the CollisionEventsEnabled component. If you'd like to revert to the old behavior of having collision events for all entities, consider making CollisionEventsEnabled a required component for Collider:
app.register_required_components::<Collider, CollisionEventsEnabled>();Collisions
The Collisions resource is now a SystemParam.
// Old
fn iter_collisions(collisions: Res<Collisions>) {
todo!()
}
// New
fn iter_collisions(collisions: Collisions) {
todo!()
}Internally, Collisions now stores a ContactGraph that stores both touching and non-touching contact pairs. The Collisions system parameter is just a wrapper that provides a simpler API and only returns touching contacts.
The collisions_with_entity method has also been renamed to collisions_with, and all methods that mutatate, add, or remove contact pairs have been removed from Collisions. However, the following mutating methods are available on ContactGraph:
get_mutiter_mutiter_touching_mutcollisions_with_mutadd_pair/add_pair_with_keyinsert_pair/insert_pair_with_keyremove_pairremove_collider_with
For most scenarios, contact modification and removal are intended to be handled with CollisionHooks.
ContactPair (previously Contacts)
The during_current_frame and during_previous_frame properties of ContactPair have been removed in favor of a flags property storing information in a more compact bitflag format. The is_sensor, is_touching, collision_started, and collision_ended helper methods can be used instead.
ContactManifold
Methods such as AnyCollider::contact_manifolds_with_context now take &mut Vec<ContactManifold> instead of returning a new vector every time. This allows manifolds to be persisted more effectively, and reduces unnecessary allocations.
BroadCollisionPairs
The BroadCollisionPairs resource has been removed. Use the ContactGraph resource instead.
AabbIntersections
The AabbIntersections component has been removed. Use ContactGraph::entities_colliding_with instead.
Change CollisionLayers to a Required Component #693
CollisionLayers is now a required component for colliders and is inserted automatically. Collision detection may not work properly without it.
Reorganize Collision Detection Modules and Re-Exports #698
Some collision detection modules and imports have been reorganized.
The following modules have been moved:
layersfromcollisiontocollision::collidercontact_queryfromcollisiontocollision::collider::parryfeature_idfromcollisiontocollision::contact_types
Previously, a lot of collision detection types were also re-exported directly from the collision module. Now, there is instead a prelude for the collision module.
Contact Constraint Generation System Ordering #699
NarrowPhaseSet::GenerateConstraints has been removed. Contact constraints are now generated as part of NarrowPhaseSet::Update.
Rename Entity Properties #718 #719
ContactPair: Theentity1andentity2properties are nowcollider1andcollider2, andbody_entity1andbody_entity2are nowbody1andbody2.ContactConstraint: Theentity1andentity2properties are nowbody1andbody2, andcollider_entity1andcollider_entity2are nowcollider1andcollider2.ColliderQuery: Therigid_bodyproperty has been renamed toof(forColliderOf) and there is a newbodyhelper to get the contained entity directly.
What's Changed
v0.2.1
What's Changed
- Prevent panic when despawning entities with NoAuto components by @ramirezmike in #608
- Fix effective inverse mass computation for 3D friction by @Jondolf in #609
- Fix outdated mentions of the default schedule by @Jondolf in #611
- PhysicsLayer import crate based on which crate (2d or 3d) is being used by @ironpeak in #601
- Fix test after 0.15.1 breakage by @Jondolf in #621
- Fix physics being run with zero delta time by @Jondolf in #622
- Fix
From<Rotation>implementation forRot2by @Jondolf in #623 - Fix
SleepingPluginnot being optional and addWakeUpBodycommand by @Jondolf in #624 - Fix use of unmaintaned crate proc-macro-error by @PhantomMorrigan in #627
- Release
avian_derive0.2.2 by @Jondolf in #628 - Simplify
transform_to_positionand fix rotation denormalization by @Jondolf in #620 - clarify that collider-aabb is in world space by @cBournhonesque in #636
- Fix SpatialPipeline with_predicate docs by @cBournhonesque in #638
- Make avian3d::dynamics::rigid_body::forces public by @SetOfAllSets in #630
- Improve docs for velocity components by @Jondolf in #641
New Contributors
- @ramirezmike made their first contribution in #608
- @ironpeak made their first contribution in #601
- @PhantomMorrigan made their first contribution in #627
- @SetOfAllSets made their first contribution in #630
Full Changelog: v0.2.0...v0.2.1
Avian v0.2.0
Avian Physics 0.2 has been released! 🪶
Highlights
Avian 0.2 is another massive release, with several new features, quality-of-life improvements, and important bug fixes. Highlights include:
- Reworked scheduling: Avian now runs in Bevy's
FixedPostUpdateinstead of having its own fixed timestep inPostUpdate, simplifying scheduling and fixing several common footguns. - Transform interpolation: Movement at fixed timesteps can be visually smoothed with built-in transform interpolation or extrapolation.
- Mass property rework: Mass properties have been overhauled from the ground up to be much more intuitive, flexible, and configurable.
- Physics picking: Colliders have a picking backend for
bevy_picking. - Disabling physics entities: Rigid bodies, colliders, and joints can be temporarily disabled with marker components.
- Better defaults: Collision layers, friction, and restitution now have more sensible and configurable defaults.
- Improved 3D friction: Friction behavior in 3D is much more stable and realistic than before.
- Limit maximum speeds: The maximum speed of rigid bodies can be easily clamped for stability and gameplay purposes.
- Bevy 0.15 support: Avian supports the latest version of Bevy.
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
Take SpatialQueryFilter by reference in spatial queries #402
Spatial queries performed through SpatialQuery now take SpatialQueryFilter by reference.
Use hooks for component initialization #483
PrepareSet::PreInit has been renamed to PrepareSet::First, and PrepareSet::InitRigidBodies, PrepareSet::InitColliders, and PrepareSet::InitMassProperties have been removed. Most missing components are now initialized by component lifecycle hooks.
CcdPlugin and SpatialQueryPipeline no longer store a schedule and are now unit structs. Instead of SpatialQueryPlugin::new(my_schedule) or SpatialQueryPlugin::default(), just use SpatialQueryPlugin.
Use FixedPostUpdate by default and simplify scheduling #457
Previously, physics was run in PostUpdate with a custom fixed timestep by default. The primary purpose of the fixed timestep is to make behavior consistent and frame rate independent.
This custom scheduling logic has been removed, and physics now runs in Bevy's FixedPostUpdate by default. This further unifies physics with Bevy's own APIs and simplifies scheduling. However, it also means that physics now runs before Update, unlike before.
For most users, no changes should be necessary, and systems that were running in Update can remain there. If you want to run systems at the same fixed timestep as physics, consider using FixedUpdate.
The Time<Physics> clock now automatically follows the clock used by the schedule that physics is run in. In FixedPostUpdate and other schedules with a fixed timestep, Time<Fixed> is used, but if physics is instead configured to run in a schedule with a variable timestep, like PostUpdate, it will use Time<Virtual>.
Previously, the physics timestep could be configured like this:
app.insert_resource(Time::new_with(Physics::fixed_hz(60.0)));Now, if you are running physics in FixedPostUpdate, you should simply configure Time<Fixed> directly:
app.insert_resource(Time::<Fixed>::from_hz(60.0)));The following types and methods have also been removed as a part of this rework:
TimestepModePhysics::from_timestepPhysics::fixed_hzPhysics::fixed_once_hzPhysics::variableTime::<Physics>::from_timestepTime::<Physics>::timestep_modeTime::<Physics>::timestep_mode_mutTime::<Physics>::set_timestep_mode
Previously, camera following logic had to be scheduled relative to both physics and transform propagation:
// Run after physics, before transform propagation.
app.add_systems(
PostUpdate,
camera_follow_player
.after(PhysicsSet::Sync)
.before(TransformSystem::TransformPropagate),
);Since physics is now run in FixedPostUpdate, which is before Update, it is enough to order the system against just transform propagation:
// Note: camera following could technically be in `Update` too now.
app.add_systems(
PostUpdate,
camera_follow_player.before(TransformSystem::TransformPropagate),
);Use a single layer as the default membership instead of all #476 #494
Previously, CollisionLayers defaulted to "all memberships, all filters", meaning that everything belonged to every layer and could interact with every layer. This turned out to be very limiting in practice, as it made it impossible to target things like ray casts to specific layers, unless the memberships of all colliders were set explicitly.
Now, colliders only belong to the first layer by default. This means that the first bit 0b0001 in the layer mask is reserved for the default layer.
This also applies to enum-based layers using the PhysicsLayer derive macro. To make the default layer explicit, physics layer enums must now implement Default, and specify which variant represents the default layer 0b0001.
#[derive(PhysicsLayer, Default)]
enum GameLayer {
#[default]
Default, // The name doesn't matter, but Default is used here for clarity
Player,
Enemy,
Ground,
}Rework mass properties #500 #532 #574
Inverse Mass Components
InverseMassandInverseInertiahave been removed, andInertiahas been renamed toAngularInertia.RigidBodyQueryItemmethodseffective_inv_massandeffective_world_inv_inertiahave been renamed toeffective_inverse_massandeffective_global_inverse_inertia.
MassPropertyPlugin
The MassPropertyPlugin is now needed to update mass properties automatically based on attached colliders. Most apps won't need to add it manually, as it is included in the PhysicsPlugins plugin group by default.
Behavior Changes
Mass,AngularInertia, andCenterOfMassare now optional, and can be used to override the mass properties of an entity if present, ignoring the entity's collider. Mass properties that are not set are still computed from the entity'sColliderandColliderDensity.- Mass properties of child entities still contribute to the total mass properties of rigid bodies by default, but the total values are stored in
ComputedMass,ComputedAngularInertia, andComputedCenterOfMassinstead ofMass,AngularInertia, andCenterOfMass. The latter components are now never modified by Avian directly. - To prevent colliders or descendants from contributing to the total mass properties, add the
NoAutoMass,NoAutoAngularInertia, andNoAutoCenterOfMassmarker components to the rigid body, giving you full manual control. - Previously, changing
Massat runtime did not affect angular inertia. Now, it is scaled accordingly, unlessNoAutoAngularInertiais present. - Previously, specifying the
CenterOfMassat spawn did nothing unless an initialMasswas specified, even if the entity had a collider that would give it mass. This has been fixed. - Previously,
Mass,AngularInertia, andCenterOfMassdid nothing on child colliders. Now, they effectively overrideColliderMassPropertieswhen computing the total mass properties for the rigid body. - Previously, zero mass and angular inertia were treated as invalid. It emitted warnings, which was especially problematic and spammy for runtime collider constructors. Now, they are treated as acceptable values, and interpreted as infinite mass, like in most other engines.
API Changes
Mass,AngularInertia,CenterOfMass,ColliderDensity, andColliderMassPropertiesnow always usef32types, even with thef64feature. Total mass properties stored inComputedMass,ComputedAngularInertia, andComputedCenterOfMassstill supportf64.- In 3D,
AngularInertianow stores a principal angular inertia (Vec3) and the orientation of the local inertial frame (Quat) instead of an inertia tensor (Mat3). However, several different constructors are provided, includingfrom_tensor. MassPropertiesBundle::new_computedandColliderMassProperties::from_colliderhave been renamed tofrom_shape.ColliderMassPropertiesnow stores aMassProperties2d/MassProperties3dinstead of separate properties.- Types implementing
AnyCollidermust now also implement theComputeMassProperties2d/ComputeMassProperties3dtrait instead of themass_propertiesmethod.
Collider Constructors #540
Collider::regular_polygon and ColliderConstructor::RegularPolygon now use a u32 instead of usize for sides.
Use required components for component initialization #541
The CollidingEntities component is no longer added automatically. To read entities that are colliding with a given entity, you must now add the CollidingEntities component for it manually.
To revert to the old behavior, you can also make CollidingEntities a required component for colliders:
app.register_required_components::<Collider, CollidingEntities>();Improvements to friction and restitution #551
Friction and Restitution are no longer inserted automatically for rigid bodies. Instead, there are now DefaultFriction and DefaultRestitution resources, whic...
v0.1.2
A full diff of what has been fixed can be seen here: v0.1.1...v0.1.2
v0.1.1
A full diff of what has been fixed can be seen here: v0.1.0...v0.1.1