There are a few minor breaking changes, see this document.
New Functionality
- Added Cosserat rods to soft bodies. This is a stick constraint with an orientation that can be used to attach geometry. Can be used e.g. to simulate vegetation in a cheap way. See the new
SoftBodyCosseratRodConstraintTestdemo. - Added ability to drive hinge constraints with
Ragdoll::DriveToPoseUsingMotors. This also addsHingeConstraint::SetTargetOrientationBSwhich sets the target angle in body space. - Added
JPH_USE_EXTERNAL_PROFILEcmake option that allows overriding the behavior of the profile macros. - Added
SoftBodyCreationSettings::mFacesDoubleSidedwhich treats the faces of the soft body as double sided. This can be used to make e.g. flags double sided. - Added functions to get the
CharacterSettingsfrom aCharacterandCharacterVirtualSettingsfrom aCharacterVirtual. - Added support for compound shapes as character shape in
CharacterVirtual. - Added
BodyInterface::SetIsSensor/IsSensorfunctions.
Bug Fixes
- Fixed bug in
ManifoldBetweenTwoFaceswhich would not find the correct manifold in case face 1 had 3 or more vertices and face 2 only 2. E.g. for a box resting the long edge of a cylinder this would mean that only a single contact point was found instead of 2 (the other way around would work fine). - Fixed bug in
ConvexHullShape::CollideSoftBodyVerticeswhere the wrong edge could be reported as the closest edge. - Fixed bug in
PhysicsSystem::OptimizeBroadPhase. When calling this function after removing all bodies from thePhysicsSystem, the internal nodes would not be freed until bodies are added again. This could lead to running out of internal nodes in rare cases. - Fixed bug in
MeshShapeactive edge calculation which could mark edges of non-manifold meshes as inactive instead of active. - Fixed passing underestimate of penetration depth in
ContactListener::OnContactPersistedwhen the contact comes from the contact cache. QuadTreewill now fall back to the heap when running out of stack space during collision queries. Previously this would trigger an assert and some collisions would not be detected.- Fixed
BodyInterface::MoveKinematic,SetLinearVelocity,SetAngularVelocity,SetLinearAndAngularVelocity,AddLinearVelocity,AddLinearAndAngularVelocity,SetPositionRotationAndVelocityandSetMotionTypewhen body not added to the physics system yet. - Fixed UBSAN false positive error that detected a dirty trick in
SimShapeFilter. - WheelSettingsTV and WheelSettingsWV were not serializing their base class members.
- The remap tables in
SoftBodySharedSettings::OptimizationResultsmapped from new to old index instead of from old to new as was documented. The maps now behave as documented. - Fixed an issue where soft body bend constraints could be created with identical vertices. This led to an assert triggering.
- Fixed infinite recursion when colliding a
TriangleShapevs aTriangleShape. - 32-bit MinGW g++ doesn't call the correct overload for the new operator when a type is 16 bytes aligned. This could cause unaligned read access violations.
- Fixed compiling in double precision and fixed issues with floating point contraction that caused unit test failures on LoongArch architecture.
- Added an epsilon to the
CastRay/CastShapeearly out condition to avoid dividing by a very small number and overflowing to INF. This can cause a float overflow exception. - Fixed Samples requiring Vulkan extension
VK_EXT_device_address_binding_reportwithout checking if it is available. - Fixed Vulkan warning in Samples: VkSemaphore is being signaled by VkQueue but it may still be in use by VkSwapchainKHR.
- Fixed incorrect RTTI definition of
MotorcycleControllerSettingswhich led to the members ofWheeledVehicleControllerSettingsnot being serialized. - Implemented missing
VehicleConstraint::GetConstraintSettingsfunction. - Fixed colliding a compound shape vs a regular shape ignoring
CollideShapeSettings::mMaxSeparationDistance. This potentially led to missed collisions.