rapier3d-f64
3-dimensional physics engine in Rust.
0.35.2
4.5M downloads/mo
#4750 most downloaded on crates.io
dimforge/rapier
What this package is like to depend on
Last release 8 days ago
15 Aug 2026
Release timing varies
gaps range from 2 weeks to 5 months
Nearly every release is documented
notes for 47 of 50 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
56 releases · first in 2021
13 releases in the last 12 months
see the full history below
Release timeline
56 releases · Jan 2021 to Aug 2026Releases
latest 56-
0.35.215 Aug 2026Release notes
Open source →Fixed
- Multibody: guard against the instabilities the semi-implicit coriolis term can introduce when the mass matrix is near-singular. The free-velocity update is re-solved with the plain mass matrix whenever it injects more energy than the applied forces’ work.
- Motors and limits of multibody joints now honor their compliance (the CFM term was left out of the row’s effective mass), so their gains may need to be stiffer to settle as fast as before.
- Generic (multibody) joint constraints now reserve the exact number of jacobian rows they emit: an axis carrying both a motor and a limit produces two, exceeding the previous allocation.
- The impulses reported on contacts (and the contact-force events derived from them) are now the
total impulse applied during the step, instead of one substep too many: they drop by
1 / (num_solver_iterations + 1)and no longer vary withwarmstart_coefficient. - MJCF: a geom’s
marginis no longer loaded as acontact_skin, which made geoms rest that far apart. It is ignored below rapier’s speculative-contact distance, and becomes the body’s soft-CCD prediction above it (PairOverride::marginis removed). - MJCF: actuators now load as
MotorModel::ForceBased, matching MuJoCo gains, which are absolute generalized forces rather than accelerations.
-
0.35.108 Aug 2026Release notes
Open source →Added
- Added public access to the testbed’s
WindowandGraphicsManagerto enable custom rendering on third-party examples.
- Added public access to the testbed’s
-
0.35.008 Aug 2026Release notes
Open source →Added
-
ContactForceEvent::first_tick:trueon the step a pair's total contact force first exceeds itscontact_force_event_threshold(coming from below it, or from separation),falsewhile it stays above on consecutive steps — the analogue of PhysX's "threshold force found" vs "persists" report. The status resets when the force drops back below the threshold or the colliders separate. -
CoefficientCombineRule::GeometricMean: combines friction/restitution assqrt(c1 * c2), the convention used by several other engines. It has the highest rule priority, and clamps negative coefficients to zero before the square root. -
DebugRenderStyle::sleep_eligible_color_multiplier: the debug-renderer now draws bodies that are eligible for sleep but still awake in a distinct color, making it easy to spot what is keeping a pile awake.
Fixed
Wheel::rotationnow accumulates from the wheel's own rolling direction on the contact plane (contact normal × axle, the same forward direction used by the friction update) instead of the chassis'index_forward_axis, so wheels visually spin whenever the vehicle actually rolls (adapted from PR #950 by @tomo0613).DynamicRayCastVehicleControllerno longer has unlimited braking friction when a wheel's side impulse is exactly zero (e.g. braking in a straight line): the skid clamp now applies to the forward impulse as well, so braking strength is bounded byfriction_slip(PR #947 by @tomo0613).- Angular joint limits are no longer restricted to
(-π, π): the limit rows now measure the wrapped joint angle from the middle of the allowed range (with the joint axis as the row's jacobian, like the angular motor rows), so a range may sit anywhere on the circle ([0, 3π/2]stops the joint at 3π/2 instead of π/2, and ranges crossing the ±π seam like[3π/4, 5π/4]work at all). A range wider than a full turn is indistinguishable from "no limit" for an angle read off a relative rotation, so it now leaves the axis free instead of clamping it at some folded-back angle. - Joint limit rows (linear and angular) now cap their position-correction bias by
IntegrationParameters::max_corrective_velocity, like contacts always did: a deep limit violation recovers over a few steps instead of catapulting the bodies. - Python:
DynamicRayCastVehicleController.update_vehiclenow excludes the chassis body from the suspension raycasts by default (their origins sit on its own collider). - The character controller's snap-to-ground now triggers on any movement that isn't upwards,
including movements exactly orthogonal to the up vector, instead of requiring a downward
motion larger than an arbitrary epsilon. Purely lateral movement along the ground no longer
flickers the
groundedflag when snap-to-ground is enabled (PR #481 by @ChrisJanssens). - Restitution is now applied as an end-of-step pass instead of during the velocity solve, so contacts detected speculatively (within the prediction distance) bounce with the requested coefficient instead of being damped away by the prediction distance (issue #974).
- SIMD joint constraints now build their local frames relative to the body's center of mass, fixing joints on bodies whose center of mass isn't at their origin (PR #953 by @Kyzzsa).
- The broad phase now filters candidate pairs by collision groups, so colliders that can never interact don't reach the narrow phase at all (issue #288).
ContactForceEventsums the pair's solver manifolds, so contact clustering no longer makes the reported force and contact point disagree with what the solver applied.- Generic (multibody) contact constraints now rebuild their anchors in the same frames the substep update uses, fixing multibodies welded to rigid-bodies never settling (issue #968).
RigidBodyBuilder::additional_masson a body whose colliders are all massless (zero density) now derives the angular inertia from the collider shapes instead of leaving it null, so such bodies rotate (issue #666).- Joints specified through a subset of their axes now complete the missing frame axes with a
twist-consistent minimal rotation, so a prismatic joint whose axis isn't
xno longer picks an arbitrarily rolled frame (issue #746). RigidBody::sleep()is now honored immediately, even when the body was repositioned during the same frame (issue #448).ImpulseJointSet::joints_betweennow yields every joint between the two bodies instead of only the first (issue #866).CollisionPipeline::stepnow clears the rigid-bodies' modified flags, so a collision-only pipeline no longer accumulates stale change tracking (issue #662).- Contact impulses are stored with canonicalized signed zeros, removing a source of
cross-platform divergence with
enhanced-determinism. - The debug-renderer now draws the border radius of 2D round triangles (issue #634).
- Testbed: objects no longer flash visible for one frame when the surface rendering is disabled (issue #843).
Modified
- The broad phase no longer creates pairs between colliders attached to the same
rigid-body (they can never collide). A single awake body carrying thousands of
mutually-overlapping colliders previously flooded the pair map and contact graph with
pairs the narrow phase re-discarded every step; the issue #970 scene (2,210 convex
colliders on one always-awake body) steps ~90x faster while stationary and ~18x
faster while moving. Note that
NarrowPhase::contact_pairnow returnsNonefor same-parent colliders instead of a manifold-less pair. - Sleep eligibility is now judged on the actual per-step pose displacement (measured at the body’s farthest point) instead of the velocities: a body held in place by contacts can sleep even with residual solver velocities, while a body creeping through solver position corrections cannot.
- With the
block-solverfeature, manifolds whose 2x2 constraint matrix is almost singular (e.g. redundant contact points) are now solved with the sequential solver instead of a degraded one-point solve, removing residual jiggle in piles. The block solver also uses the same lexicographic manifold point ordering as the sequential solver. - Improved 3D solver performance by caching the constraints angular jacobians instead of recomputing them at each solver iteration.
-
-
0.35.0-glamx0.208 Aug 2026 pre-releaseNothing published for this version
-
0.35.0-beta.002 Aug 2026 pre-releaseRelease notes
Open source →Breaking changes
- ⚠ Removed the
simd-stable,simd-nightlyandsimd-is-enabledfeatures: SIMD is now always on, backed bywide(which falls back to scalar code where unsupported); the nightlycore::simdbackend is gone (we will support it when it get stabilized). Just drop these features from yourCargo.toml. - ⚠
PhysicsHooksandEventHandlernow requireSyncinstead ofSend + Sync(through the blanket-implementedutils::MaybeSync). Existing implementations keep compiling. - ⚠ Sleeping was rewritten around persistent islands: an island sleeps and wakes strictly
as a unit, so a body is never frozen while something it touches still moves. The
IslandManagerandRigidBodyActivationserialization formats changed. - ⚠ Sleep thresholds changed:
normalized_linear_thresholddefaults to0.05(was0.4, and is now measured at the body’s farthest point) andtime_until_sleepto0.5seconds (was2.0). - ⚠ Awake bodies are solved as a single active set:
IntegrationParameters::min_island_sizewas removed. - ⚠ The CCD solver was rewritten around sweep-based time of impact: each fast body is
clamped to its earliest impact (pose only; velocities resolve through speculative
contacts), and already-touching pairs no longer pin the body in place.
CCDSolver::predict_impacts_at_next_positions/clamp_motions,PredictedImpactsandTOIEntrywere replaced byCCDSolver::solve_continuous. - ⚠ Fast dynamic bodies now always run CCD against fixed colliders;
ccd_enabledupgrades a body to a "bullet" that also sweeps kinematic and dynamic bodies. SetIntegrationParameters::max_ccd_substepsto0to disable CCD entirely. - ⚠ Body velocities are now capped each substep: linear speed at
IntegrationParameters::max_linear_velocity()(default 400 units/s) and rotation at ~45° per step (RigidBody::set_allow_fast_rotationbypasses the angular cap).RigidBodyCcd::ccd_max_distbecameRigidBody::max_extent(), whichmax_point_velocitynow takes as an argument. - ⚠ Contact defaults changed:
normalized_prediction_distanceis0.02(was0.002),normalized_max_corrective_velocityis3.0(was10.0) andnormalized_allowed_linear_erroris0.005(was0.001), greatly reducing tunneling through thin walls. Contacts against fixed bodies use a stiffer spring (IntegrationParameters::static_contact_softness). - ⚠
SolverContactstores per-body anchors instead of a single world point, and friction and restitution became per-manifold (newfriction/restitutionfields onContactModificationContext, instead of per-contact). InsidePhysicsHooks::modify_solver_contactsthe anchors still hold fresh world-space points, anddistedits are still honored.ContactModificationContext::solver_contactsis now aSolverContacts(an inlineArrayVecin 2D, still aVecin 3D). - ⚠
ContactPaircan now store reduced solver clusters alongside its manifolds; useContactPair::solver_manifolds()to read what the solver actually sees. - ⚠
RigidBody::additional_solver_iterationsnow adds whole solver substeps for the body’s constraint-connected component, converging much better on high mass ratios.
Added
- NaN/infinity quarantine: bodies and colliders whose pose, velocity or geometry goes
non-finite are rolled back to their last valid pose, disabled, and reported through
PhysicsPipeline::quarantine()/PhysicsWorld::quarantine()(newQuarantinetype), instead of corrupting the rest of the simulation. - Thread-pool API on
PhysicsPipeline/PhysicsWorld(parallelfeature):configure_thread_pool,set_thread_pool,thread_pool,clear_thread_poolandnum_threads. When set, the whole step runs inside that pool. enhanced-determinismcan now be combined withparallel, with results bitwise identical for any thread-pool size, and costs no measurable performance anymore (cross-platform determinism now rests on glam’s shared scalar core pluslibm-pinned transcendentals). It remains incompatible withsimd8, and cross-platform reproducibility still requires matching numeric features (block-solver, f32 vs f64).- New
simd8feature: widens the solver’s SIMD from 4 to 8 lanes (f32 only; needs an AVX2-capable target to emit 256-bit instructions). - New
block-solverfeature (on by default in 2D): solves adjacent contact points as coupled 2x2 blocks for better resting-stack stability. - New
unsync-callbacksfeature: drops theSyncrequirement fromPhysicsHooksandEventHandlerfor thread-affine callbacks (a JS closure, a GUI handle). Callbacks then all run on the thread drivingstep(), and the thread-pool API above is compiled out (install a pool by stepping from inside it). Parallelism is kept: only the pairs that can reach a callback are held back for the driving thread. - New
solver-bounds-checksfeature: validates the solver’s body indices at constraint generation, turning a stale index into a clean panic instead of an unchecked SIMD gather. ColliderBuilder::oriented_polyline(2D): a one-sided polyline that only collides on the side determined by vertex winding.IntegrationParameters::contact_clusteringandcontact_recycling(both on by default, plusnormalized_contact_recycle_distance): reduce narrow-phase and solver work on composite-shape and resting contacts.IntegrationParameters::friction_in_bias_passandwarmstart_jointssolver tuning knobs.
Modified
- The narrow phase and constraint solver were reworked around a persistent contact graph and a staged multithreaded solver (parallelism within a single island), for lower per-step overhead and steadier timings; multithreaded trajectories may shift within solver tolerance.
- The broad phase was reworked for large, mostly-static worlds: scenes with very large static collider counts now pay near-zero per-step broad-phase cost.
- Gyroscopic forces are applied per-substep in the principal inertia frame, improving fast-spinning asymmetric bodies.
- Removed the x86 flush-to-zero/denormals-are-zero floating-point flag: it mutated a process-wide control register behind the user’s back.
- ⚠ Removed the
-
0.34.004 Jul 2026Release notes
Open source →Added
- Multibody joints now support a per-DoF armature (reflected rotor inertia, matching MuJoCo's
concept), exposed via
Multibody::armature()/armature_mut(). The relatedMultibody::dof_inverse_inertia()returns the articulated DoF inverse inertia including armature. - Multibody joints now support passive per-DoF springs (MuJoCo-style spring/damper) via
MultibodyJoint::set_spring()/spring(), integrated implicitly. - Multibody joints now support holonomic DoF coupling: constrain one generalized coordinate to
another via
MultibodyDofCouplingandMultibody::add_dof_coupling()/couplings(). MultibodyLink::assembly_id()exposes the offset of a link's DoFs in the multibody's generalized coordinate/velocity vectors.rapier3d-mjcf: support for tendons, equality constraints, materials (including visual-mesh materials), actuator max-force, joint DoF coupling, armature, per-DoF spring/damper, and control.- Testbed: the ability to specify a material.
Fixed
- Corrected the local frame of impulse joints attached to multibodies.
- Added a missing coupling term for loop-closing impulse-joint constraints (bodies with a non-zero center-of-mass offset).
- Fixed a crash occurring with the
parallelfeature enabled.
Modified
- Breaking (
rapier_testbedonly): the testbed was reworked to remove the callback-based API.Harness::add_callback/clear_callbacksand theHarnessPlugintrait were removed, and several testbed/harness types (RunState,PhysicsState,RapierBroadPhaseType,TestbedApp::from_builders/set_builders, etc.) were changed. Simulation setup now drives the physics world directly instead of registering per-step callbacks. The corerapier2d/rapier3dphysics API is unaffected.
- Multibody joints now support a per-DoF armature (reflected rotor inertia, matching MuJoCo's
concept), exposed via
-
0.33.005 Jun 2026Release notes
Open source →Added
- New
mjcf-rsandrapier3d-mjcfcrates: a pure-Rust (nolibmujoco/FFI) loader for the MuJoCo MJCF XML format.mjcf-rsparses MJCF into a typed AST — resolving<include>,<default>class inheritance, angle units, and the several rotation specs (quat,axisangle,euler,xyaxes,zaxis) — andrapier3d-mjcfconverts a model into rigid-bodies, colliders, and joints viaMjcfRobot. Meshes load behind thestl/wavefront/mshfeatures, and visual meshes support per-vertex normals with optional smoothing (#936, #943). - Python bindings for Rapier 2D/3D (
rapier-py-*crates underpython/), generated and published as installable wheels (#938). - New
PhysicsWorldconvenience wrapper bundlingRigidBodySet,ColliderSet, the broad/narrow phases, islands, joints, the CCD solver, gravity, and integration parameters in a single struct, for simpler setup of basic simulations. It also exposes helpers for waking bodies (wake_up,wake_up_all), iterating only active bodies (active_bodies), and iterating joints — including those attached to a given body (impulse_joints,impulse_joints_with,multibody_joints,multibody_joints_with). std/allocfeature gating:no_stdbuilds are now supported, and a subset of the library compiles withoutallocas well (e.g. forspirvtargets) (#928).InteractionGroupsandGroupnow derivebytemuck::NoUninitunder thebytemuckfeature, andInteractionTestModeis#[repr(u32)], making them GPU-uploadable.MultibodyJoint::joint_rot()andMultibodyJoint::coords()expose the joint’s rotation and generalized coordinates publicly.ImpulseJointSet::set_bodiesrewires an existing impulse joint to a new pair of bodies while preserving its handle, configuration, and warm-started impulses.rapier3d-urdf:- New
UrdfLoaderOptions::mesh_converterlets the loader replace the original mesh with a cheap proxy shape (e.g.MeshConverter::Obb) while keeping the source mesh available for rendering via the newUrdfCollider::visual/UrdfVisualtypes. - New
UrdfLoaderOptions::scaleapplies a uniform scale to link positions, joint anchors, mesh sizes, primitive shape sizes, inertial offsets, and prismatic joint limits. - New
UrdfLoaderOptions::squeeze_empty_fixed_links(defaulttrue) removes empty links connected by fixed joints, splicing the kinematic chain so bodyless “frame-only” links (e.g.world,*_tcp) no longer create mass-less rigid-bodies. - URDF files with empty
<geometry></geometry>blocks are now accepted (sanitized before parsing, then skipped when building colliders). - The
urdf_rscrate is re-exported.
- New
Fixed
QueryPipeline::project_pointnow honors itsmax_distargument (it was previously ignored).- Several multibody-related crashes (#906, #907, #908, #927).
- Continuous Collision Detection now consults the user's
PhysicsHooks::filter_contact_pairhook, matching narrow-phase semantics. Previously, CCD would clamp a fast-moving body's motion at a predicted impact with a pair the user had filtered out (#929, closes #754). - Corrected the documentation of
RigidBody::add_force/add_torque/reset_forces/reset_torques: user-defined forces and torques are not cleared automatically between steps and persist until explicitly reset (#903).
Modified
- Unify version numbers for
rapier3d-urdf,rapier3d-meshloader, andrapier3d-mjcfso they follow the same versioning as the other libraries in the workspace. - Breaking (CCD solver direct callers only):
CCDSolver::find_first_impactandCCDSolver::predict_impacts_at_next_positionsnow take an extrahooks: &dyn PhysicsHooksargument.PhysicsPipeline::stepcallers are unaffected. - Breaking:
QueryPipeline::project_point_and_get_featurenow takes an additionalmax_dist: Realargument. - Breaking (
rapier3d-urdf):UrdfLink::collidersandUrdfLinkHandle::colliderschanged fromVec<Collider>/Vec<ColliderHandle>toVec<UrdfCollider>/Vec<UrdfColliderHandle>to carry the optional visual mesh override. - Behavior change (
rapier3d-urdf): withsqueeze_empty_fixed_linksdefaulting totrue, empty links bridged by fixed joints are now collapsed by default. Set it tofalseto keep the previous behavior. - Update
glamxto 0.3. - Updated
wideversion to1(#902).
- New
-
0.33.0-alpha12 Jul 2026 pre-releaseNothing published for this version
-
0.32.009 Jan 2026Release notes
Open source →Modified
- Breaking: Migrate math types from nalgebra to glam (via parry). The main type aliases are now:
Isometry<Real>→Pose(glamxPose2/3)Point<Real>→Vectorfor world-space positions (parry no longer distinguishes Point from Vector)Rotation<Real>→Rotation(glamxRot2orQuat)Translation<Real>→ removed, usePose::from_translation()- nalgebra is still used internally for SIMD code and multibody Jacobians (via
SimdVector<N>,SimdPose<N>,DVector,DMatrix).
- Breaking: Several getters now return by value instead of by reference:
RigidBody::linvel()returnsVectorinstead of&Vector<Real>RigidBody::angvel()returnsAngVectorinstead of&Vector<Real>(3D) orReal(2D)RigidBody::center_of_mass()returnsVectorinstead of&Point<Real>RigidBody::local_center_of_mass()returnsVectorinstead of&Point<Real>Collider::translation()returnsVectorinstead of&Vector<Real>Collider::rotation()returnsRotationinstead of&Rotation<Real>
- Breaking:
DebugRenderBackend::draw_linesignature changed: takesVectorinstead ofPoint<Real>for line endpoints. - Breaking:
DebugRenderBackend::draw_polylineanddraw_line_stripnow take&PoseandVectorinstead of&Isometry<Real>and&Vector<Real>. - Testbed migrated from Bevy to kiss3d for lighter dependencies and simpler maintenance.
- Removed
benchmarks2dandbenchmarks3dcrates (merged withexamples2dandexamples3d).
Migration guide
If your codebase currently relies on
nalgebra, note thatnalgebraandglamxprovide type conversion. Enable the corresponding features:nalgebra = { version = "0.34", features = [ "convert-glam030" ] }glamx = { version = "0.1", features = ["nalgebra"] }then you can convert betweenglamandnalgebratypes using.into().
- Type changes: Replace
Isometry<Real>withPose, andPoint<Real>withVectorfor positions. - Pose construction:
Isometry::identity()→Pose::IDENTITYIsometry::translation(x, y, z)→Pose::from_translation(Vector::new(x, y, z))Isometry::rotation(axis_angle)→Pose::from_rotation(Rotation::from_scaled_axis(axis_angle))isometry.translation.vector→pose.translationisometry.rotation.scaled_axis()→pose.rotation.to_scaled_axis()
- Getter usage: Remove
&or.clone()when usinglinvel(),angvel(),center_of_mass(),translation(),rotation()since they now return by value. - Debug renderer: Update
DebugRenderBackendimplementations to useVectorinstead ofPoint<Real>. - glam access: The
glamxcrate is re-exported asrapier::glamxfor direct glam type access if needed.
- Breaking: Migrate math types from nalgebra to glam (via parry). The main type aliases are now:
-
0.31.021 Nov 2025Release notes
Open source →InteractionGroupsstruct now containsInteractionTestMode. Continues rapier/pull/170 for rapier/issues/622InteractionGroupsconstructor now requires anInteractionTestModeparameter. If you want same behaviour as before, useInteractionTestMode::And(eg.InteractionGroups::new(Group::GROUP_1, Group::GROUP_1, InteractionTestMode::And))CoefficientCombineRule::Min- now makes sure it uses a non zero value as result by usingcoeff1.min(coeff2).abs()InteractionTestMode: Specifies which method should be used to test interactions. SupportsANDandOR.CoefficientCombineRule::ClampedSum- Adds the two coefficients and does a clamp to have at most 1.- Rename
ColliderChanges::CHANGEDto::IN_CHANGED_SETto make its meaning more precise. - Rename
RigidBodyChanges::CHANGEDto::IN_CHANGED_SETto make its meaning more precise. - Fix colliders ignoring user-changes after the first simulation step.
- Fix broad-phase incorrectly taking into account disabled colliders attached to an enabled dynamic rigid-body.
- Grouped
IntegrationParameters::contact_natural_frequencyandIntegrationParameters::contact_damping_ratiobehind a singleIntegrationParameters::contact_softness(#789). - Removed the
Integration_parametersmethods related toerpandcfm. They are now methods of theIntegrationParameters::softnessandGenericJoint::softnessfields (#789). - Removed
IntegrationParameters::joint_natural_frequencyandIntegrationParameters::joint_damping_ratioin favor of per-joint softness coefficientsGenericJoint::softness(#789). - Make
SolverContact::contact_idpublic so that user code knows what geometric contact it originates from (#888).
-
0.30.117 Oct 2025Release notes
Open source →- Kinematic rigid-bodies will no longer fall asleep if they have a nonzero velocity, even if that velocity is very small. The rationale is that, since that velocity is chosen by the user, they really want the platform to move even if the speed is low.
- Fix bug where kinematic bodies would ignore the
wake_upflag passed toset_linear_velocityandset_angular_velocity. - Add serde derives to
PdController,PidControllerandDynamicRaycastVehiclecontrollers.
-
0.30.003 Oct 2025Release notes
Open source →- Update to parry 0.25 (which involves breaking changes in the
VoxelsAPI but improves its internal storage to support large voxel maps).
- Update to parry 0.25 (which involves breaking changes in the
-
0.29.005 Sep 2025Release notes
Open source →This version contains a significant rework of the internal velocity constraints solver. This makes it both simpler and more optimized (making the whole simulation up to 25% faster). For details on all the changes, see #876.
Notable changes include:
- Update to parry 0.24 (includes a breaking change where all the
*angular_inertia_sqrtfields and functions have been replaced by their non-square-root equivalent. - Fixed bug where friction on kinematic bodies would affect dynamic bodies much more weakly than it should.
- In 3D, added a new friction model that is more efficient than the traditional Coulomb friction. This new simplified
model is enabled by default and can be changed with
IntegrationParameters::friction_model. - Removed support for the legacy PGS solver. Removed
IntegrationParameters::pgs_legacyand::tgs_soft_without_warmstart.
- Update to parry 0.24 (includes a breaking change where all the
-
0.28.008 Aug 2025Release notes
Open source →Modified
- Update to nalgebra 0.34 and parry 0.23.
- Only run the broad-phase once at the beginning of the physics step.
- Don’t rebuild a BVH from scratch for CCD. Instead, reuse the broad-phase bvh with localized changes.
- The public methods of
IslandSolverhas changed slightly to take the broad-phase as input. - Removed the
BroadPhasetrait and use the BVH broad-phase directly instead of a trait-object.
Added
- Add
Collider::compute_broad_phase_aabbto compute the AABB to be used by the broad-phase, taking into account its contact skin, prediction, and soft-ccd.
Fix
- Fix issue where some solver contacts would disappear from the contact graph before the user had a chance to read them.
-
0.27.024 Jul 2025Release notes
Open source →Modified
- Modified the
QueryPipelineAPI to take some geometric elements by-value instead of by-reference to make them easier to use. - Modified the character controller to take the query-pipeline by reference instead of by-value.
Fixed
- Fix crash in the new BVH broad-phase when removing colliders in a particular order.
- Modified the
-
0.27.0-beta.011 Jul 2025 pre-releaseRelease notes
Open source →Modified
- Replace the hierarchical SAP broad-phase by a broad-phase based on parry’s new BVH structure.
- The
QueryPipelineis now and ephemeral object obtained from the broad-phase withbroad_phase.as_query_pipeline(). It no longer needs to be updated separately from the broad-phase.
Fixed
- Fix NaN resulting from non-clamped input to simd_asin in angular motor solver.
-
0.26.123 May 2025Release notes
Open source →Added
- Add
RigidBodySet::get_pair_mutandColliderSet::get_pair_mutto get two mutable rigid-bodies or colliders simultaneously.
- Add
-
0.26.016 May 2025Release notes
Open source →Modified
- Update to parry 0.21.0. This changes the initialization of
Voxelscolliders by removing the primitive geometry argument. This also fixes intersection checks with voxels, and force calculation between voxels and other voxels or compound shapes.
- Update to parry 0.21.0. This changes the initialization of
-
0.25.102 May 2025 -
0.25.024 Apr 2025Release notes
Open source →Added
- Added support for parry’s new
Voxelscollider shape withColliderBuilder::voxels,ColliderBuilder::voxels_from_points, andColliderBuilder::voxelized_mesh. MeshConverternow implementsCopy.
Modified
- Update parry to 0.20.0.
- Added support for parry’s new
-
0.24.010 Apr 2025Release notes
Open source →Added
IntegrationParametersnow implementsPartialEq.
Modified
- Update dependencies (including
parry0.19).
-
0.23.105 Mar 2025Release notes
Open source →Added
- Add
PdControllerandPidControllerfor making it easier to control dynamic rigid-bodies at the velocity level. This can for example be used as a building block for a dynamic character controller. - Add
RigidBodyPosition::pose_errorsto compute the translational and rotational delta betweenRigidBodyPosition::positionand::next_position. - Implement
SubforRigidBodyVelocity. - Add
RigidBody::local_center_of_mass()to get its center-of-mass in the rigid-body’s local-space.
- Add
-
0.23.008 Jan 2025Release notes
Open source →Fix
- The broad-phase region key has been replaced by an i64 in the f64 version of rapier, increasing the range before panics occur.
- Fix
BroadphaseMultiSapnot being able to serialize correctly with serde_json. - Fix
KinematicCharacterController::move_shapenot respecting parametersmax_slope_climb_angleandmin_slope_slide_angle. - Improve ground detection reliability for
KinematicCharacterController. (#715) - Fix wasm32 default values for physics hooks filter to be consistent with native:
COMPUTE_IMPULSES. - Fix changing a collider parent when ongoing collisions should be affected (#742):
- Fix collisions not being removed when a collider is parented to a rigidbody while in collision with it.
- Fix collisions not being added when the parent was removed while intersecting a (previously) sibling collider.
Added
RigidBodySetandColliderSethave a new constructorwith_capacity.- Use
profilingcrate to provide helpful profiling information in different tools.- The testbeds have been updated to use
puffin_egui
- The testbeds have been updated to use
Modified
InteractionGroupsdefault value formembershipsis nowGROUP_1(#706)ImpulseJointSet::get_muthas a new parameterwake_up: bool, to wake up connected bodies.- Removed unmaintained
instantin favor ofweb-time. This effectively removes thewasm-bindgentransitive dependency as it's no longer needed. - Significantly improve performances of
QueryPipeline::intersection_with_shape.
-
0.22.020 Jul 2024Release notes
Open source →Fix
- Fix crash when removing a multibody joint, or a rigid-body with a multipody-joint attached to it.
- Fix crash when inserting multibody joints in an arbitrary order (instead of incrementally from root to leaf).
- Fix
BroadphaseMultiSapnot being able to serialize a field with serde_json.
Added
- Implement rotation gizmo for Ball 2D shape (as radius line) in Debug renderer if
DebugRenderMode::COLLIDER_SHAPESenabled - Implement
DebugforColliderSet,InteractionGraph,MultibodyLink,MultibodyJointSet,Multibody,ImpulseJointSet
Modified
- Update parry to v0.17. Refer to its changelog for further details.
- Divided by two the value of each
QueryFilterFlagsvariant so that the smallest one is 1 instead of 2 (fixes a bug in rapier.js). BroadphaseMultiSapnow serializes itscolliders_proxy_idsasVec[(ColliderHandle, BroadPhaseProxyIndex)].
-
0.21.023 Jun 2024Release notes
Open source →Fix
- Fix
NaNvalues appearing in bodies translation and rotation after a simulation step with a delta time equal to 0 (#660). - Fix crash in the SAP broad-phase when teleporting an object.
Modified
- Update to
nalgebra0.33 andparry0.16. solve_character_collision_impulsescollisions parameter is now an iterator over references.
- Fix
-
0.20.009 Jun 2024Release notes
Open source →This release introduces two new crates:
rapier3d-urdffor loading URDF files into rapier3d. This will load the rigid-bodies, colliders, and joints.rapier3d-stlfor loading an STL file as a collision shape.
Added
- Add
Multibody::inverse_kinematics,Multibody::inverse_kinematics_delta, and::inverse_kinematics_delta_with_jacobianfor running inverse kinematics on a multibody to align one its links pose to the given prescribed pose. - Add
InverseKinematicsOptionto customize some behaviors of the inverse-kinematics solver. - Add
Multibody::body_jacobianto get the jacobian of a specific link. - Add
Multibody::update_rigid_bodiesto update rigid-bodies based on the multibody links poses. - Add
Multibody::forward_kinematics_single_linkto run forward-kinematics to compute the new pose and jacobian of a single link without mutating the multibody. This can take an optional displacement on generalized coordinates that are taken into account during transform propagation. - Implement
DebugforColliderBuilder. - Add
Collider::converted_trimeshandMeshConverterfor building a collider with a shape computed from a mesh’s index and vertex buffers. That computed shape can currently be aTriMesh, aCuboid(covering the mesh’s AABB or OBB), a convex hull, or a convex decomposition. - Implement
DefaultforRigidBodyBuilder. This is equivalent toRigidBodyBuilder::dynamic(). - Implement
DefaultforColliderBuilder. This is equivalent toColliderBuilder::ball(0.5). - Add
RevoluteJoint::angleto compute the joint’s angle given the rotation of its attached rigid-bodies.
Modified
- Renamed
JointAxesMask::X/Y/Zto::LIN_X/LIN_Y/LIN_Z; and renamedJointAxesMask::X/Y/Zto::LinX/LinY/LynZto make it clear it is not to be used as angular axes (the angular axis areJointAxesMask::ANG_X/ANG_Y/AngZandJointAxesMask::AngX/AngY/AngZ). - The contact constraints regularization parameters have been changed from
erp/damping_ratiotonatural_frequency/damping_ratio. This helps define them in a timestep-length independent way. The new variables are namedIntegrationParameters::contact_natural_frequencyandIntegrationParameters::contact_damping_ratio. - The
IntegrationParameters::normalized_max_penetration_correctionhas been replaced by::normalized_max_corrective_velocityto make the parameter more timestep-length independent. It is now set to a non-infinite value to eliminate aggressive "popping effects". - The
Multibody::forward_kinematicsmethod will no longer automatically update the poses of theRigidBodyassociated to each joint. InsteadMultibody::update_rigid_bodieshas to be called explicitly. - The
Multibody::forward_kinematicsmethod will automatically adjust the multibody’s degrees of freedom if the root rigid-body changed type (between dynamic and non-dynamic). It can also optionally apply the root’s rigid-body pose instead of the root link’s pose (useful for example if you modified the root rigid-body pose externally and wanted to propagate it to the multibody). - Remove an internal special-case for contact constraints on fast contacts. The doesn’t seem necessary with the substep solver.
- Remove
RigidBody::add_collider. This was an implementation detail previously needed bybevy_rapier. To attach a collider to a rigid-body, useColliderSet::insert_with_parentorColliderSet::set_parent. - Rename
JointAxis::X/Y/Zto::LinX/LinY/LinZto avoid confusing it with::AngX/AngY/AngZ. - Rename
JointAxesMask::X/Y/Zto::LIN_X/LIN_Y/LIN_Zto avoid confusing it with::ANG_X/ANG_Y/ANG_Z. - The function
RigidBody::add_collideris now private. It was only public because it was needed for some internalbevy_rapierplumbings, but it is no longer useful. Adding a collider must always go through theColliderSet. CharacterController::solve_character_collision_impulsesnow takes multipleCharacterCollisionas parameter: this change will allow further internal optimizations.QueryPipeline::updatenow doesn't need theRigidBodySetas parameter.- Removed
QueryPipelineMode. QueryPipeline::update_with_modewas renamed to::update_with_generatorand now takesimpl QbvhDataGenerator<ColliderHandle>as parameter see [QueryPipeline::updaters] module for more information.
-
0.19.005 May 2024Release notes
Open source →Fix
- Fix crash when simulating a spring joint between two dynamic bodies.
- Fix kinematic bodies not being affected by gravity after being switched back to dynamic.
- Fix regression on contact force reporting from contact force events.
- Fix kinematic character controller getting stuck against vertical walls.
- Fix joint limits/motors occasionally not being applied properly when one of the attached rigid-bodies is fixed.
- Fix an issue where contacts would be completely ignored between two convex shapes.
Added
Many stability improvements were added as part of this release. To see illustrations of some of these changes, see #625.
- Add
RigidBody::predict_position_using_velocityto predict the next position of the rigid-body based only on its current velocity. - Add
Collider::copy_fromto copy most collider attributes to an existing collider. - Add
RigidBody::copy_fromto copy most rigid-body attributes to an existing rigid-body. - Add the
BroadPhasetrait and expect an implementor of this trait as input toPhysicsPipeline::step. - Implement a 2D block-solver as well as warmstarting. Significantly improves stacking capabilities. Generally reduces the "pop" effect that can happen due to penetration corrections.
- Add
RigidBodyBuilder::soft_ccd_predictionandRigidBody::set_soft_ccd_predictionto enablesoft-ccd: a form of CCD based on predictive contacts. This is helpful for objects moving moderately fast. This form of CCD is generally cheaper than the normal (time-dropping) CCD implemented so far. It is possible to combine both soft-ccd and time-dropping ccd. - Add a
ColliderBuilder::contact_skin,Collider::set_contact_skin, andCollider::contact_skin. This forces the solver te maintain a gap between colliders with non-zero contact skin, as if they had a slight margin around them. This helps performance and stability for thin objects (like triangle meshes). - Internal edges were reworked to avoid dropping contacts that would help with stability, and improve stability of
collisions between two triangle meshes. The
TriMeshFlags::FIX_INTERNAL_EDGESandHeightFieldFlags::FIX_INTERNAL_EDGESflags were added to enable internal edges handling. - Add
IntegrationParameters::length_unitsto automatically adjust internal thresholds when the user relies on custom length units (e.g. pixels in 2D).
Modified
Many shape-casting related functions/structs were renamed. Check out the CHANGELOG for parry 0.15.0 for additional details.
- Renamed
BroadPhasetoBroadPhaseMultiSap. TheBroadPhaseis now a trait that can be implemented for providing a custom broad-phase to rapier. Equivalently, theDefaultBroadPhasetype alias can be used in place ofBroadPhaseMultiSap. - The kinematic character controller autostepping is now disabled by default.
- Add
KinematicCharacterController::normal_nudge_factorused to help getting the character unstuck due to rounding errors. - Rename
TOItoShapeCastHit. - Rename many fields from
toitotime_of_impact. - The
QueryPipeline::cast_shapemethod now takes aShapeCastOptionsinstead of themax_toiandstop_at_penetrationparameters. This allows a couple of extra configurations, including the ability to have the shape-cast target a specific distance instead of actual shape overlap.
-
0.18.024 Jan 2024Release notes
Open source →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 for additional information.
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, callIntegrationParameters::switch_to_standard_pgs_solver().It is now possible to specify some additional solver iteration for specific rigid-bodies (and everything interacting with it directly or indirectly through contacts and joints):
RigidBodyBuilder::additional_solver_iterationsandRigidBodyBuilder::set_additional_solver_iterations. This allows for higher-accuracy on subsets of the physics scene without affecting performance of the other parts of the simulation.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 where collisions would not be re-computed after a collider was re-enabled.
Added
- Add a
SpringJointandSpringJointBuilderfor simulating springs with customizable stiffness and damping coefficients. - Add
SphericalJoint::local_frame1/2,::set_local_frame1/2, andSphericalJointBuilder::local_frame1/2to set both the joint’s anchor and reference orientation. - Add
EffectiveCharacterMovement::is_sliding_down_slopeto indicate if the character controlled by the kinematic character controller is sliding on a slope that is too steep. - Add
Wheel::side_friction_stiffnessto customize the side friction applied to the vehicle controller’s wheel. - Add
Wheel::raycast_infoto access more wheel information relative to the ground. - Add
DebugRenderStyle::disabled_color_multiplierto make the debug-renderer color disabled object differently. - Fix incorrect update of angular degrees-of-freedoms on spherical multibody joints.
- Fix debug-renderer showing moved kinematic rigid-bodies only at their initial position.
Modified
- Make
Wheel::friction_slippublic to customize the front friction applied to the vehicle controller’s wheels. - Add the
DebugRenderBackend::filter_objectpredicate that can be implemented to apply custom filtering rules on the objects being rendered. - Switch the testbed to
bevy 0.12and use its new Gizmos API for rendering lines. - Rename
NarrowPhase::contacts_withtoNarrowPhase::contact_pairs_with. - Rename
NarrowPhase::intersections_withtoNarrowPhase::intersection_pairs_with.
-
0.17.226 Feb 2023Release notes
Open source →Fix
- Fix issue with convex polyhedron jitter due to missing contacts.
- Fix character controller getting stuck against vertical walls.
- Fix character controller’s snapping to ground not triggering sometimes.
- Fix character controller’s horizontal offset being mostly ignored and some instances of vertical offset being ignored.
-
0.17.122 Jan 2023Release notes
Open source →Fix
- Fix bug resulting in dynamic rigid-bodies acting as kinematic bodies after being disabled and then re-enabled.
-
0.17.015 Jan 2023Release notes
Open source →Added
- Add
RigidBody::set_enabled,RigidBody::is_enabled,RigidBodyBuilder::enabledto enable/disable a rigid-body without having to delete it. Disabling a rigid-body attached to a multibody joint isn’t supported yet. - Add
Collider::set_enabled,Collider::is_enabled,ColliderBuilder::enabledto enable/disable a collider without having to delete it. - Add
GenericJoint::set_enabled,GenericJoint::is_enabledto enable/disable a joint without having to delete it. Disabling a multibody joint isn’t supported yet. - Add
DynamicRayCastVehicleController, a vehicle controller based on ray-casting and dynamic rigid-bodies (mostly a port of the vehicle controller from Bullet physics). - Add
RigidBody::user_forceandRigidBody::user_torqueto read the forces or torques added by the user to a dynamic rigid-body. - Add
RigidBody::locked_axesto get the rigid-body axes that were locked by the user.
Modified
- Add the
QueryPipelineas an optional argument toPhysicsPipeline::stepandCollisionPipeline::step. If this 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, callingQueryPipeline::updateaPhysicsPipeline::stepisn’t needed. RigidBody::set_body_typenow takes an extra boolean argument indicating if the rigid-body should be woken-up (if it becomes dynamic).RigidBody::mass_propertiesnow also returns the world-space mass-properties of the rigid-body.
Fix
- Fix bug resulting in rigid-bodies being awakened after they are created, even if they are created sleeping.
- Add
-
0.16.110 Nov 2022 -
0.16.030 Oct 2022Release notes
Open source →Added
- Implement
CopyforCharacterCollision. - Implement conversion (
Fromtrait) betweenGroupandu32. - Add
ColliderBuilder::trimesh_with_flagsto build a triangle mesh with specific flags controlling its initialization.
Modified
- Rename
AABBtoAabbto comply with Rust’s style guide. - Switch to
parry 0.11.
Fix
- Fix internal edges of 3D triangle meshes or 3D heightfields generating invalid contacts preventing balls from moving straight.
- Implement
-
0.15.002 Oct 2022Release notes
Open source →Added
- Add a kinematic character controller implementation. See the
controlmodule. The character controller currently supports the following features:- Slide on uneven terrains
- Interaction with dynamic bodies.
- Climb stairs automatically.
- Automatically snap the body to the floor when going downstairs.
- Prevent sliding up slopes that are too steep
- Prevent sliding down slopes that are not steep enough
- Interactions with moving platforms.
- Report information on the obstacles it hit on its path.
- Implement
serdeserialization/deserialization forCollisionEventswhen theserde-serializefeature is enabled
Modified
- The methods
Collider::set_rotation,RigidBody::set_rotation, andRigidBody::set_next_kinematic_rotationnow take a rotation (UnitQuaternionorUnitComplex) instead of a vector/angle. - The method
QueryFilter::exclude_dynamicis now a static method (theselfargument was removed). - The
QueryPipeline::cast_shapemethod has a new argumentstop_at_penertation. If set tofalse, the linear shape-cast won’t immediately stop if the shape is penetrating another shape at its starting point and its trajectory is such that it’s on a path to exit that penetration state. - The
InteractionGroupsis now a set of explicit bit flags instead of a rawu32. - The world-space mass properties of rigid-bodies are now updated automatically whenever the user changes their position.
- Add a kinematic character controller implementation. See the
-
0.14.010 Jul 2022Release notes
Open source →Fixed
- Fix unpredictable broad-phase panic when using small colliders in the simulation.
- Fix collision events being incorrectly generated for any shape that produces multiple contact manifolds (like triangle meshes).
- Fix panic in the
CollisionPipelineif a collider is both added and removed before a call toCollisionPipeline::step.
Modified
- The
RigidBodyBuilder::additional_massmethod will now result in the additional angular inertia 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 methods
RigidBodyBuilder::additional_principal_angular_inertia. UseRigidBodyBuilder::additional_mass_propertiesinstead. - The
Collider::densitymethod now always returns aReal(instead of anOption<Real>). - Rename
RigidBody::restrict_rotationsandRigidBody::restrict_translationstoRigidBody::set_enabled_rotationsandRigidBody::set_enabled_translations. - Rename
RigidBodyBuilder::restrict_rotationsandRigidBodyBuilder::restrict_translationstoRigidBodyBuilder::enabled_rotationsandRigidBodyBuilder::enabled_translations.
Added
- Add
RigidBody::recompute_mass_properties_from_collidersto force the immediate computation of a rigid-body’s 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 additional mass-properties or a change of one of its collider’s mass-properties. - Add
RigidBody::set_additional_massto set the additional mass for the collider. The additional angular inertia is automatically computed based on the attached colliders shapes. - Add
Collider::set_density,::set_mass,set_mass_properties, to alter a collider’s mass properties. Note that::set_masswill result in the collider’s angular inertia being automatically computed based on this mass and on its shape. - Add
ColliderBuilder::massto 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. - Add
Collider::massandCollider::volumeto retrieve the mass or volume of a collider. - Add the
QueryFilterthat is now used by all the scene queries instead of theCollisionGroupsandFn(ColliderHandle) -> boolclosure. ThisQueryFilterprovides easy access to most common filtering strategies (e.g. dynamic bodies only, excluding one particular collider, etc.) for scene queries. - Add force reporting based on contact force events. The
EventHandlertrait has been modified to include the methodEventHandler::handle_contact_force_event. Contact force events are generated whenever the sum of the magnitudes of all the forces between two colliders is greater than any of theirCollider::contact_force_event_thresholdvalues (only the colliders wit theActiveEvents::CONTACT_FORCE_EVENTflag set are taken into account for this threshold). - Add the
ContactForceEventstruct that is generated by theChannelEventCollectorto report contact force events.
-
0.13.031 May 2022Release notes
Open source →Fixed
- Fix incorrect sensor events being generated after collider removal.
- Fix bug where the CCD thickness wasn’t initialized properly.
- Fix bug where the contact compliance would result in undesired tunneling, despite CCD being enabled.
Modified
- Add a
wake_up: boolargument to theImpulseJointSet::insertandMultibodyJointSet::insertto automatically wake-up the rigid-bodies attached to the inserted joint. - The methods
ImpulseJointSet::remove/remove_joints_attached_to_rigid_body,MultibodyJointSet::remove/remove_joints_attached_to_rigid_bodyandMultibodyjointSet::remove_multibody_articulationsno longer require thebodiesandislandsarguments. - Make the
instantdependency optional, behind aprofilercargo feature. - Rename STATIC to FIXED in the
ActiveCollisionTypesflags. - Rename
ImpulseJointSet::joints_withto::attached_joints. Add the joint’s handle to the closure arguments. - Make the default debug-render less noisy out-of-the-box by only rendering joints, rigid-bodies, and colliders by default.
Added
- Debug-renderer: add rendering of contacts, solver contacts, and collider Aabbs
- Add
MultibodyJointSet::attached_jointsto return all the multibody joints attached to a given rigid-body.
-
0.12.030 Apr 2022Release notes
Open source →Fixed
- Fix the simulation when the
parallelfeature is enabled. - 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 bug where collider modifications (like changes of collision groups, or shape) would not wake-up their attached rigid-body, or would not have any effect on pre-existing contacts.
- Fix the automatic update of a rigid-body’s mass properties after changing one of its attached colliders.
- Fix the broad-phase becoming potentially invalid after a change of collision groups.
Modified
- Switch to
nalgebra0.31. - Switch to
parry0.9. - Rename
JointHandletoImpulseJointHandle. - Rename
RigidBodyMassPropsFlagstoLockedAxes. - Rename
RigidBody::apply_force,::apply_torque,::apply_force_at_pointto::add_force,::add_torque, and::add_force_at_pointto better reflect the fact that they are not cleared at the end of the timestep. - Rename
RigidBodyType::StatictoRigidBodyType::Fixedto avoid confusion with thestatickeyword. - All method referring to
staticrigid-bodies now usefixedinstead ofstatic. - Rename
RigidBodyBuilder::new_static, new_kinematic_velocity_based, new_kinematic_velocity_basedtoRigidBodyBuilder::fixed, kinematic_velocity_based, kinematic_velocity_based. - The
ContactEventandIntersectionEventhave been replaced by a single enumCollisionEventin order to simplify the user’s event handling. - The
ActiveEvents::CONTACT_EVENTSandActiveEvents::INTERSECTION_EVENTSflags have been replaced by a single flagActiveEvents::COLLISION_EVENTS. - Joint motors no longer have a
VelocityBasedmodel. The new choices areAccelerationBasedandForceBasedwhich are more stable. - Calling the
.build()function from builders (RigidBodyBuilder,ColliderBuilder, etc.) is no longer necessary when adding them to sets. It is automatically called thanks toInto<_>implementations. - The
ComponentSetabstractions (and related_genericmethods likePhysicsPipeline::step_generic) have been removed. Custom storage for colliders and rigid-bodies are no longer possible: use the built-inRigidBodySetandColliderSetinstead.
Semantic modifications
These are changes in the behavior of the physics engine that are not necessarily reflected by an API change. See #304 for extensive details.
RigidBody::set_linvelandRigidBody::set_angvelno longer modify the velocity of static bodies.RigidBody::set_body_typewill reset the velocity of a rigid-body to zero if it is static.- Don’t automatically clear forces at the end of a timestep.
- Don’t reset the velocity of kinematic bodies to zero at the end of the timestep.
- Events
CollisionEvent::Stoppedare now generated after a collider is removed.
Added
- Significantly improve the API of joints by adding:
- Builders based on the builder pattern.
- Getters and setters for all joints.
- Method to convert a
GenericJointto one of the more specific joint type.
- Improve stability of joint motors.
- Adds a
boolargument toRigidBodySet::remove. If set tofalse, the colliders attached to the rigid-body won’t be automatically deleted (they will only be detached from the deleted rigid-body instead). - Add
RigidBody::reset_forcesandRigidBody::reset_torquesto reset all the forces and torques added to the rigid-body by the user. - Add the
debug-rendercargo feature that enables theDebugRenderPipeline: a line-based backend-agnostic renderer to debug the state of the physics engine.
- Fix the simulation when the
-
0.12.0-alpha.116 Jan 2022 pre-releaseNothing published for this version
-
0.12.0-alpha.002 Jan 2022 pre-releaseRelease notes
Open source →Fixed
- Fixed
RigidBody::restrict_rotationsto properly take into account the axes to lock.
Modified
- 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. TheRevoluteJoint, PrismaticJoint, FixedJoint, andSphericalJoint(formerly namedBallJoint) structures still exist but are just convenient ways to initialize the genericImpulseJoint. - Our constraints solver has been modified. Before we used one velocity-based resolution followed by one position-based resolution. We are now using two velocity-based resolution: the first one includes constraints regularization whereas the second one doesn’t. This simplifies the resolution code significantly while offering stiffer results.
Added
- Added multibody joints: joints based on the reduced-coordinates modeling. These joints can’t violate their positional constraint.
- Implement
Defaultfor most of the struct that supports it.
- Fixed
-
0.11.313 May 2022Nothing published for this version
-
0.11.202 May 2022Nothing published for this version
-
0.11.112 Sep 2021Release notes
Open source →Fixed
- 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 a bug where two colliders without parent would not have their collision computed even if the appropriate flags were set.
-
0.11.008 Aug 2021Release notes
Open source →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
Added
- Joint limits are now implemented for all joints that can support them (prismatic, revolute, and ball joints).
Modified
- Switch to
nalgebra 0.29.
Fixed
- Fix the build of Rapier when targeting emscripten.
-
0.10.112 Jul 2021Release notes
Open source →Added
- Add
Collider::set_translation_wrt_parentto change the translation of a collider with respect to its parent rigid-body. - Add
Collider::set_rotation_wrt_parentto change the translation of a collider with respect to its parent rigid-body.
- Add
-
0.10.011 Jul 2021Release notes
Open source →Added
- Implement
CloneforIslandManager.
Modified
JointSet::insertno longer takes the rigid-body set in its arguments.- Modify the testbed's plugin system to let plugins interact with the rendering.
- Implement
PartialEqfor most collider and rigid-body components.
- Implement
-
0.9.208 Jun 2021Release notes
Open source →Added
- 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.
Fixed
- Fix a panic that could happen when the same collider is listed twice in the removed_colliders array.
-
0.9.103 Jun 2021Release notes
Open source →Added
- Add
rapier::prelude::nalgebraso that thevector!andpoint!macros work out-of-the-box after importing the prelude:use rapier::prelude::*
- Add
-
0.9.002 Jun 2021Release notes
Open source →The user-guide has been fully rewritten and is now exhaustive! Check it out on rapier.rs
Added
- A prelude has been added in order to simplify the most common imports. For example:
use rapier3d::prelude::* - Add
RigidBody::set_translationandRigidBody.translation(). - Add
RigidBody::set_rotationandRigidBody.rotation(). - Add
RigidBody::set_next_translationfor setting the next translation of a position-based kinematic body. - Add
RigidBody::set_next_rotationfor setting the next rotation of a position-based kinematic body. - Add kinematic bodies controlled at the velocity level: use
RigidBodyBuilder::new_kinematic_velocity_basedorRigidBodyType::KinematicVelocityBased. - Add the cargo feature
debug-disable-legitimate-fe-exceptionsthat can be enabled for debugging purpose. This will disable floating point exceptions whenever they happen at places where we do expect them to happen (for example some SIMD code do generate NaNs which are filtered out by lane-wise selection).
Modified
The use of
RigidBodySet, ColliderSet, RigidBody, Collideris 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 with other engines (for example this allows us to use Bevy's Query as our rigid-body/collider sets).The
RigidBodySet, ColliderSet, RigidBody, Colliderare still the best option for whoever doesn't want to provide their own component sets.Rigid-bodies
- Renamed
BodyStatustoRigidBodyType. RigidBodyBuilder::translationnow takes a vector instead of individual components.RigidBodyBuilder::linvelnow takes a vector instead of individual components.- The
RigidBodyBuilder::new_kinematichas be replaced by theRigidBodyBuilder::new_kinematic_position_basedandRigidBodyBuilder::new_kinematic_velocity_basedconstructors. - The
RigidBodyType::Kinematicvariant has been replaced by two variants:RigidBodyType::KinematicVelocityBasedandRigidBodyType::KinematicPositionBased.
Colliders
Colliderbuilder::translationnow takes a vector instead of individual components.- The way
PhysicsHooksare enabled changed. Now, a physics hooks is executed if any of the two colliders involved in the contact/intersection pair contains the relatedPhysicsHooksFlag. These flags are configured on each collider withColliderBuilder::active_hooks. As a result, there is noPhysicsHooks::active_hooksmethod any more. - All events are now disabled for all colliders by default. Enable events for specific colliders by setting its
active_eventsbit mask toActiveEvents::CONTACT_EVENTSand/orActiveEvents::PROXIMITY_EVENTS. - Add a simpler way of enabling collision-detection between colliders attached to two non-dynamic rigid-bodies: see
ColliderBuilder::active_collision_types. - The
InteractionGroupsis now a structures with twou32integers: one integers for the groups membership and one for the group filter mask. (Before, both were only 16-bits wide, and were packed into a singleu32). - Before, sensor colliders had a default density set to 0.0 whereas non-sensor colliders had a default density of 1.0. This has been unified by setting the default density to 1.0 for both sensor and non-sensor colliders.
- Colliders are no longer required to be attached to a rigid-body. Therefore,
ColliderSet::insertonly takes the collider as argument now. In order to attach the collider to a rigid-body, (i.e., the old behavior ofColliderSet::insert), useColliderSet::insert_with_parent. - Fixed a bug where collision groups were ignored by CCD.
Joints
- The fields
FixedJoint::local_anchor1andFixedJoint::local_anchor2have been renamed toFixedJoint::local_frame1andFixedJoint::local_frame2.
Pipelines and others
- The field
ContactPair::pair(which contained two collider handles) has been replaced by two fields:ContactPair::collider1andContactPair::collider2. - The list of active dynamic bodies is now retrieved with
IslandManager::active_dynamic_bodiesinstead ofRigidBodySet::iter_active_dynamic. - The list of active kinematic bodies is now retrieved with
IslandManager::active_kinematic_bodiesinstead ofRigidBodySet::iter_active_kinematic. NarrowPhase::contacts_withnow returns animpl Iterator<Item = &ContactPair>instead of anOption<impl Iterator<Item = (ColliderHandle, ColliderHandle, &ContactPair)>>. The colliders handles can be read from the contact-pair itself.NarrowPhase::intersections_withnow returns an iterator directly instead of anOption<impl Iterator>.- Rename
PhysicsHooksFlagstoActiveHooks. - Add the contact pair as an argument to
EventHandler::handle_contact_event
- A prelude has been added in order to simplify the most common imports. For example:
-
0.8.012 Apr 2021 -
0.7.203 Apr 2021Release notes
Open source →Added
- Implement
SerializeandDeserializefor theCCDSolver.
Fixed
- Fix a crash that could happen after adding and then removing a collider right away, before stepping the simulation.
- Implement
-
0.7.102 Apr 2021Release notes
Open source →Fixed
- Fixed a bug in the broad-phase that could cause non-determinism after snapshot restoration.
-
0.7.002 Apr 2021Release notes
Open source →Added
- 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. This is done by using motion-clamping, i.e., each fast-moving rigid-body with CCD enabled will be stopped at the time where their first contact happen. This will result in some "time loss" for that rigid-body. This loss of time can be reduced by increasing the maximum number of CCD substeps executed (the default being 1).
- Add the support of collider modification. Now, most of the characteristics of a collider can be modified after the collider has been created.
- We now use an implicit friction cone for handling friction, instead of a pyramidal approximation of the friction cone. This means that friction will now behave in a more isotropic way (i.e. more realistic Coulomb friction).
- Add the support of custom filters for the
QueryPipeline. So far, interaction groups (bit masks) had to be used to exclude from colliders from a query made with theQueryPipeline. Now it is also possible to provide a custom closures to apply arbitrary user-defined filters. - It is now possible to solve penetrations using the velocity solver instead of (or alongside) the
position solver (this is disabled by default, set
IntegrationParameters::velocity_based_erpto a value> 0.0to enable.).
Added the methods:
ColliderBuilder::halfspaceto create a collider with an unbounded plane shape.Collider::shape_mutto get a mutable reference to its shape.Collider::set_shape,::set_restitution_combine_rule,::set_position_wrt_parent,::set_collision_groups::set_solver_groupsto change various properties of a collider after its creation.RigidBodyBuilder::ccd_enabledto enable CCD for a rigid-body.
Modified
- The
target_distargument ofQueryPipeline::cast_shapewas removed. RigidBodyBuilder::mass_propertieshas been deprecated, replaced by::additional_mass_properties.RigidBodyBuilder::masshas been deprecated, replaced by::additional_mass.RigidBodyBuilder::principal_angular_inertiahas been deprecated, replaced by::additional_principal_angular_inertia.- The field
SolveContact::datahas been replaced by the fieldsSolverContact::warmstart_impulse,SolverContact::warmstart_tangent_impulse, andSolverContact::prev_rhs. - All the fields of
IntegrationParametersthat we don't use have been removed. NarrowPhase::maintainhas been renamed toNarrowPhase::handle_user_changes.BroadPhase::maintainhas been removed. UseBroadPhase::updatedirectly.
Fixed
- 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).
-
0.6.102 Mar 2021Release notes
Open source →Fixed
- Fix a determinism problem that may happen after snapshot restoration, if a rigid-body is sleeping at the time the snapshot is taken.
-
0.6.001 Mar 2021Release notes
Open source →Added
- 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 an infinite mass, making it immune to the forces the other body would apply on it. See #122 for further details.
- 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 variable friction and restitution coefficient on a single collider. See #120 for further details.
- 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 for further details.
Removed
- The
ContactPairFilterandIntersectionPairFiltertraits have been removed. They are both combined in a single new trait:PhysicsHooks.
-
0.5.029 Jan 2021Release notes
Open source →In this release we are dropping
ncollideand use our new crateparryinstead! This comes with a lot of new features, as well as two new crates:rapier2d-f64andrapier3d-f64for physics simulation with 64-bits floats.Added
- Added a
RAPIER.version()function at the root of the package to retrieve the version of Rapier as a string.
Several geometric queries have been added to the
QueryPipeline:QueryPipeline::intersections_with_ray: get all colliders intersecting a ray.QueryPipeline::intersection_with_shape: get one collider intersecting a shape.QueryPipeline::project_point: get the projection of a point on the closest collider.QueryPipeline::intersections_with_point: get all the colliders containing a point.QueryPipeline::cast_shape: get the first collider intersecting a shape moving linearly (aka. sweep test).QueryPipeline::intersections_with_shape: get all the colliders intersecting a shape.
Several new shape types are now supported:
RoundCuboid,Segment,Triangle,RoundTriangle,Polyline,ConvexPolygon(2D only),RoundConvexPolygon(2D only),ConvexPolyhedron(3D only),RoundConvexPolyhedron(3D only),RoundCone(3D only).
It is possible to build
ColliderDescusing these new shapes:ColliderBuilder::round_cuboid,ColliderBuilder::segment,ColliderBuilder::triangle,ColliderBuilder::round_triangle,ColliderBuilder::convex_hull,ColliderBuilder::round_convex_hull,ColliderBuilder::polyline,ColliderBuilder::convex_decomposition,ColliderBuilder::round_convex_decomposition,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).
It is possible to specify different rules for combining friction and restitution coefficients of the two colliders involved in a contact with:
ColliderDesc::friction_combine_rule, andColliderDesc::restitution_combine_rule.
Various RigidBody-related getter and setters have been added:
RigidBodyBuilder::gravity_scale,RigidBody::gravity_scale,RigidBody::set_gravity_scaleto 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.RigidBody::set_linear_dampingandRigidBody::set_angular_dampingto set the linear and angular damping of the rigid-body.RigidBodyBuilder::restrict_rotationsto prevent rotations along specific coordinate axes. This replaces the three boolean arguments previously passed to.set_principal_angular_inertia.
Breaking changes
Breaking changes related to contacts:
- The way contacts are represented changed. Refer to the documentation
of
parry::query::ContactManifold,parry::query::TrackedContactandrapier::geometry::ContactManifoldDataandrapier::geometry::ContactDatafor details.
Breaking changes related to rigid-bodies:
- The
RigidBodyDesc.setMasstakes only one argument now. UseRigidBodyDesc.lockTranslationsto lock the translational motion of the rigid-body. - The
RigidBodyDesc.setPrincipalAngularInertiano longer have boolean parameters to lock rotations. UseRigidBodyDesc.lockRotationsorRigidBodyDesc.restrictRotationsto lock the rotational motion of the rigid-body.
Breaking changes related to colliders:
- The collider shape type has been renamed from
ColliderShapetoSharedShape(now part of the Parry crate). - The
Polygonshape no longer exists. For a 2D convex polygon, use aConvexPolygoninstead. - All occurrences of
Trimeshhave been replaced byTriMesh(note the change in case).
Breaking changes related to events:
- Rename all occurrences of
ProximitytoIntersection. - The
Proximityenum has been removed, it's replaced by a boolean.
- Added a
-
0.0.124 Jan 2021Nothing published for this version