com.unity.physics 1.4.0-pre.4
com.unity.physics
Source docsNotes: processedReleased July 24, 2025
✨ Features
- New `TerrainCollider.Create` function variant that allows customizing the triangulation pattern of the created terrain collider's cells by flipping their inner diagonal edge, thus enabling users to align the physics collision representation with their visual terrain mesh.
- A newly introduced Detailed Static Mesh Collision feature enables enhanced collision detection precision for interactions with static meshes, effectively eliminating ghost collisions that can otherwise frequently occur in the presence of small mesh triangles or at high motion speeds. To enable the feature select the "Detailed Static Mesh Collision" option in the "Advanced" section of your custom `PhysicsShapeAuthoring` component, or, If you are using built-in `Collider` components, add the new `DetailedStaticMeshCollisionAuthoring` component alongside your collider. For runtime-generated colliders, please use the `EnableDetailedStaticMeshCollision` parameter in the physics material.
- Integrity checks for incremental broadphase. When integrity checks are enabled (see Project Settings -> Physics -> Unity Physics -> Enable Integrity Checks) the `PhysicsTemporalCoherenceInfo` component data of rigid body entities is validated against the internal state of the broadphase, to make sure the data is as expected. This allows detecting unexpected external modifications to this important bookkeeping data.
📈 Improvements
- Parallelize jacobian updates for substepping without consideration of solver phases since there are no data dependencies
- Safer access to nodes in `BoundingVolumeHierarchy` of broadphase, ensuring there are no out-of-bounds accesses.
🔧 Bug Fixes
- Fixed a crash when scheduling an IBodyPairsJob and an IJacobiansJob in a situation without any body pairs or jacobians present in the simulation.
- Division by zero errors causing NaN values when a Capsule degenerates into a Sphere (occurs when Height = 2\*Radius)
- ConvexHull connectivity for flat convex colliders
- Referenced prefabs in bakers with built-in joints incorrectly displayed the anchor position when the `Auto Configure Connected Anchor` flag was enabled.
- Correctly compute the expansion space for convex / composite collision queries, preventing missed collisions in certain cases.
- Pass the "Build Static Tree" flag to tree build job in single-threaded version of static tree update.
- A specific use case has been patched which applies only to Mac Silicon devices using editor version 2022.3 and when a negative scale is used in the transform of a BoxCollider: The transform calculation from localToWorld matrix to quaternion doesn't return the correct value due to differences in the calculation of rsqrt(x). This is exhibited as BoxGeometry orientations returning a strange quaternion value when the scale is negative. This bug has been fixed in the editor.
- Prevent invalid entries in incrementally built broadphase if it was built non-incrementally previously.
- ### Security
