com.unity.physics 0.1.0-preview
Notes: processedReleased May 31, 2019
Unity Compatibility
Minimum Unity: 2019.1
Package Dependencies
🔄 Changes
- Run-Time API
- - Renamed `CollisionFilter.CategoryBits` to `CollisionFilter.BelongsTo`.
- - Renamed `CollisionFilter.MaskBits` to `CollisionFilter.CollidesWith`.
- - `RaycastInput` and `ColliderCastInput` have changed:
- - At the input level, start and end positions are now specified rather then an initial position and a displacement.
- - `Start` replaces `Position`.
- - `End` replaces `Direction` which had been confusing as it was actually a displacement vector to a second point on the ray.
- - `Ray` has been made internal as a lower level interface and updated to be less ambiguous.
- - Added job interfaces for easier reading of simulation events, instead of having to work directly with block streams.
- - `ICollisionEventsJob` calls `Execute()` for every collision event produced by the solver.
- - `ITriggerEventsJob` calls `Execute()` for every trigger event produced by the solver.
- - These events now also include the Entity's involved, not just the rigid body indices.
- - Added job interfaces for easier modification of simulation data, instead of having to work directly with block streams.
- - `IBodyPairsJob` calls `Execute()` for every body pair produced by the broad phase.
- - `IContactsJob` calls `Execute()` for every contact manifold produced by the narrowphase.
- - `IJacobiansJob` calls `Execute()` for every contact jacobian before it is solved.
- Authoring/Conversion API
- - Renamed `SecondPassLegacyRigidbodyConversionSystem` to `LegacyRigidbodyConversionSystem`.
- - Deprecated `FirstPassPhysicsBodyConversionSystem`.
- - Renamed `SecondPassPhysicsBodyConversionSystem` to `PhysicsBodyConversionSystem`.
- - Deprecated `FirstPassLegacyRigidbodyConversionSystem`.
- - Deprecated overload of `PhysicsShape.GetCapsuleProperties()` returning raw points.
- - Deprecated overload of `PhysicsShape.GetPlaneProperties()` returning raw points.
- - Renamed `PhysicsShape.FitToGeometry()` to `PhysicsShape.FitToEnabledRenderMeshes()`. New method accounts for enabled `MeshRenderer` components on child objects with the same physics body and leaf shape.
- - `PhysicsShape.GetConvexHullProperties()` now includes points from enabled `MeshRenderer` components on child objects with the same physics body and leaf shape when no custom mesh has been assigned.
- Run-Time Behavior
- - Added a fixed angle constraint to prismatic joints so they no longer rotate freely.
- - Any Entity with a `PhysicsVelocity` component will be added to the `PhysicsWorld` and integrated, even if it has no `PhysicsCollider`.
- Authoring/Conversion Behavior
- - Physics data on deactivated objects in the hierarchy are no longer converted.
- - All physics objects (i.e. bodies) are now un-parented (required since all simulation happens in world space).
- - Legacy `Collider` components are no longer converted if they are disabled.
- - Converted `PhysicsShape` objects with non-uniform scale now bake more predictable results when their `Transform` is skewed.
- - All menu paths for custom assets and authoring components have changed from 'DOTS Physics' to 'DOTS/Physics'.
🔧 Bug Fixes
- Fixed trigger events not being raised between kinematic-vs-kinematic or kinematic-vs-static body pairs.
- Fixed crash in BuildPhysicsWorld when creating a dynamic body without a `PhysicsMass` component
- Cylinder/sphere GameObjects no longer appear in first frame when draw colliders is enabled on `PhysicsDebugDisplay`.
- Fix bugs in `BoundingVolumeHierarchy.Build` which now produces `BoundingVolumeHierarchy` of greater quality. This will affect performance of BVH queries, and most notably it will significantly improve performance of `DynamicVsDynamicFindOverlappingPairsJob`
- Fixed incorrect 3DOF angular constraint solving with non-identity joint orientation
- Fixed bug where converted `SphereCollider` would apply incorrect center offset when in a hierarchy with non-uniform scale.
- Fixed bug where converted `PhysicsShape` would not become part of a compound collider at run-time if the first `PhysicsBody` ancestor found higher up the hierarchy was disabled.
- Fixed bug where leaves of compound shapes in a hierarchy might be added to the wrong entity if it had disabled `UnityEngine.Collider` components.
- Fixed bug causing leaves of compound shapes on prefabs to convert into individual static colliders.
- Fixed restitution response to be more bouncy for convex objects with high restitution values
- Fixed bug where a converted GameObject in a hierarchy would have the wrong translation and rotation at run-time.
- Fixed bug where objects with `StaticOptimizeEntity` would not be converted into physics world.
- Preview for Mesh `PhysicsShape` no longer culls back faces.
- Inspector control for convex radius on `PhysisShape` now appears when shape type is convex hull.
⚠️ Known Issues
- Attempting to fit a non-uniformly scaled `PhysicsShape` to its render meshes may produce unexpected results.
- Physics objects loaded from sub-scenes may have the wrong transformations applied on Android.
- Dragging a control label to modify the orientation of a `PhysicsShape` sometimes produces small changes in its size.
- If gizmos are enabled in the Game tab, the 'Physics Debug Display' viewers are incorrectly rendered. Debug viewers render correctly in the Scene tab.
