com.unity.physics 0.5.0-preview.1
Notes: processedReleased September 17, 2020
Unity Compatibility
Minimum Unity: 2020.1 (0f1)
Package Dependencies
- com.unity.burst (1.3.2)
- com.unity.collections (0.11.0-preview.17)
- com.unity.entities (0.13.0-preview.24)
- com.unity.jobs (0.4.0-preview.18)
- com.unity.mathematics (1.1.0)
- com.unity.modules.imgui (1.0.0)
- com.unity.modules.jsonserialize (1.0.0)
- com.unity.test-framework (1.1.11)
- com.unity.test-framework.performance (2.2.0-preview)
🔄 Changes
- Dependencies
- - Updated minimum Unity Editor version from `2019.4.0f1` to `2020.1.0f1`
- - Updated Burst from `1.3.0` to `1.3.2`
- - Updated Collections from `0.9.0-preview.6` to `0.11.0-preview.17`
- - Updated Entities from `0.11.1-preview.4` to `0.13.0-preview.24`
- - Updated Jobs from `0.2.10-preview.12` to `0.4.0-preview.18`
- - Updated Performance Testing API from `2.0.8-preview` to `2.2.0-preview`
- Run-Time API
- - Added the following new types:
- - `PhysicsGraphicsIntegration` namespace
- - `PhysicsGraphicalSmoothing` and `PhysicsGraphicalInterpolationBuffer` components, which can be used to smooth a rigid body's graphical motion when rendering and physics are out of sync
- - `RecordMostRecentFixedTime`, which stores time values from the most recent tick of `FixedStepSimulationSystemGroup`
- - `BufferInterpolatedRigidBodiesMotion`, which stores dynamic rigid bodies' motion properties at the start of the frame when when smoothed bodies use interpolation
- - `CopyPhysicsVelocityToSmoothing`, which stores dynamic rigid bodies' velocities after physics has finished in the current frame
- - `SmoothRigidBodiesGraphicalMotion`, which writes dynamic rigid bodies' `LocalToWorld` when smoothing is enabled
- - `GraphicalSmoothingUtility` class, which contains various methods for smoothing the motion of rigid bodies
- - Renamed `ComponentExtensions` to `PhysicsComponentExtensions`
- - Changed the following members/types:
- - `PhysicsComponentExtensions.GetCenterOfMassWorldSpace()` now passes `PhysicsMass` as `in` rather than `ref`.
- - `PhysicsComponentExtensions.GetLinearVelocity()` now passes `PhysicsVelocity` as `in`.
- - `PhysicsWorldExtensions.CalculateVelocityToTarget()` is now implemented and passes a `RigidTransform` for the target rather than a separate `float3` and `quaternion`.
- - Removed the following expired members/types:
- - `BodyIndexPair.BodyAIndex`
- - `BodyIndexPair.BodyBIndex`
- - Body pair interfaces on events and modifiers (`CollisionEvent`, `TriggerEvent`, `ModifiableContactHeader`, `ModifiableBodyPair` and `ModifiableJacobianHeader`)
- - `BodyCustomTags`
- - `BodyIndices`
- - `ColliderKeys`
- - `Entities`
- - `ComponentExtensions.GetCenterOfMass()`
- - `ComponentExtensions.SetCenterOfMass()`
- - `ComponentExtensions.GetAngularVelocity()`
- - `ComponentExtensions.SetAngularVelocity()`
- - `EndFramePhysicsSystem.HandlesToWaitFor`
- - `FinalJobHandle` on all core physics systems (`BuildPhysicsWorld`, `StepPhysicsWorld`, `ExportPhysicsWorld` and `EndFramePhysicsSystem`)
- - `Joint.JointData`
- - `JointData`
- - `JointFrame`
- - `Material.IsTrigger`
- - `Material.EnableCollisionEvents`
- - `MotionData.GravityFactor`
- - `PhysicsJoint.JointData`
- - `PhysicsJoint.EntityA`
- - `PhysicsJoint.EntityB`
- - `PhysicsJoint.EnableCollision`
- - `SimulationContext.Reset()` passing `PhysicsWorld`
- - `Solver.ApplyGravityAndCopyInputVelocities()` passing `NativeArray`
- - `Solver.SolveJacobians()` not passing explicit `StabilizationData`
- - Added `JointType.LimitedDegreeOfFreedom` and associated creation and control functions
- - Added `Aabb.Intersect()` function
- - Added `PhysicsComponentExtensions.GetEffectiveMass()`
- Authoring/Conversion API
- - Removed the following expired members/types:
- - `LegacyJointConversionSystem` (now internal)
- - `PhysicsMaterialTemplate.IsTrigger`
- - `PhysicsMaterialTemplate.RaisesCollisionEvents`
- - `PhysicsShapeAuthoring.IsTrigger` and `OverrideIsTrigger`
- - `PhysicsShapeAuthoring.RaisesCollisionEvents` and `OverrideRaisesCollisionEvents`
- - Added the following new types:
- - `BodySmoothing` enum
- - Added the following new members:
- - `PhysicsBodyAuthoring.Smoothing`, to enable motion smoothing
- - `PhysicsBodyAuthoring.LinearDamping` and `AngularDamping` setters now clamp incoming values to be at least 0.
- Run-Time Behavior
- - Debug rendering is now significantly faster, in the case of 3D lines.
- - Physics systems now update in the `FixedStepSimulationSystemGroup`.
- Authoring/Conversion Behavior
- - Classic `Rigidbody` interpolation mode is now supported during conversion.
- - Inspector help button for built-in authoring components and assets now opens the corresponding page in the API reference.
🔧 Bug Fixes
- Fixed issue where orientation in Physics Shape component would get dirtied when nothing changed
- Fixed issue with `PhysicsJoint.CreateHinge()` only working on a single axes.
- Fixed `Constraint.Dimension` not returning 0 when it should.
- Reduced size of compound collider/mesh collider AABB in cases where their bodies are rotated by some angle.
- Added optional integrity checks for physics ECS data consistency between BuildPhysicsWorld and ExportPhysicsWorld. Checks can be run in editor only.
- Fixed regression that caused additional sub-meshes to be ignored when converting mesh colliders.
⚠️ Known Issues
- Physics debug display may not work properly while stepping frame by frame in Editor.
