There are a few minor breaking changes, see this document.
New functionality
- The Samples application now runs on iOS and Android. See Build/README.md for more information about the controls.
- Added support for 64-bit
ObjectLayer. This e.g. allows for more groups in case you're usingObjectLayerPairFilterMask. - Added
ModifyShapesoverload toMutableCompoundShape. Adds the ability to change position, rotation and shape at the same time. EstimateCollisionResponsenow takes surface velocities into account.
Bug fixes
Compiler
- MSVC Build Tools 14.52 in combination with
/fp:fastintroduced some extra optimizations that were incompatible with Jolt. This caused failures inQuatmultiplications andFlipSign. This completely broke the simulation. - MinGW32 defines
__STDCPP_DEFAULT_NEW_ALIGNMENT__as 16 but its allocations are actually 8 byte aligned. This caused unaligned read access violations inTriangleSplitterBinning::mBins.
Simulation
- Avoiding overflow to INF if inverse effective mass is denormal. When restricting the rotation of an object using
EAllowedDOFs, a tiny rotation in a restricted axis can cause the effective mass of the angular friction component to overflow to INF and cause a FP exception. - Clamping warm start impulse ratio to avoid the simulation from exploding when updating the physics system with wildly different delta times. Note that this is not a perfect solution, so it is still recommended to step physics at a fixed time step.
- Fix out of bounds read for a body activated during the continous collision detection step.
VehicleEngineSettings::mInertiaandmAngularDampingwere not serialized in anObjectStreamor fromSaveBinaryState/RestoreBinaryState.- Fixed an issue where a body with motion quality
LinearCastcould pass through another body if its center of mass was offset. - Fixed an issue where
GearConstraintwould apply the wrong torque to body 2. CharacterVirtual::WalkStairsandCharacterVirtual::StickToFloorcould trigger an assert when stepping onto another virtual character.
Collision Detection
- If
GJKClosestPoint::CastShapefailed to converge, it was accidentally using the rejected support point to calculate the contact point. In some cases this could lead to returning the wrong contact point. - When colliding with very long and thin triangles, GJK could fail to find the closest point to the triangle because it used a fixed epsilon to determine if the triangle was too thin. Changed this epsilon so that it is dependent on the length of the edges of the triangle so that we fall back to closest point to edge in those cases.
- Handling of convex/sphere collision/cast checks against degenerate triangles. A
MeshShapeattached to aBodywith a certain transform could result in an almost degenerate triangle becoming degenerate. The code now handles this. HeightFieldShape::SetHeightscorrupted the bounding volume tree when the number of blocks was not a power of 2. This resulted in collision queries possibly failing to report the correct collision.- Fixed
HeightFieldShape::SetHeightsnot updating the last range block of a level with an odd number of blocks. This resulted in collision queries possibly failing to report the correct collision. ConvexHullShape::GetSupportingFacecould return a face that did not contain the deepest vertex, resulting in objects being able to penetrate more than they should.
Hair
- Fixed jitter in hair simulation on macOS/iOS. The shader compiler shuffled two instructions that it shouldn't have.
ComputeSystemVKnow falls back to non-cached host memory on GPUs that don't have memory that is both host coherent and host cached (e.g. Mali).ComputeSystemVKno longer requires theVK_EXT_debug_utilsinstance extension to be present.
Multi Threading
- Changed the queue in
JobSystemThreadPoolso that a worker thread that doesn't wake up cannot prevent new jobs from being added to the queue. - Fixed macOS thread performance checker warnings. Note that this requires suppressing 1 warning on the application side. See Build/README.md.
Semaphore::Acquireignoredsem_wait'sEINTR.JobSystemWithBarriercould finish a wait early on Linux.- Fixed a race condition in
JobSystemWithBarrierwhere a job that was added to a barrier could finish before the barrier counted it. When this happened,WaitForJobscould return too early resulting in memory corruption and a hang. - Suppressing clang thread safety analysis warnings which appeared under XCode 27.
Removed functionality
- Removed
PhysicsSettings::mDeterministicSimulation. Turning this off has negative impact on stacking. The simulation is now always deterministic. - Removed support for using
std::vectorinstead ofJPH::Array(defineJPH_USE_STD_VECTOR). This is a pretty obscure build option and not worth the continous testing needed to support it.