PhysicsSamples/ReleaseNotes.md
All notable changes to this project will be documented in this file.
Modify Collider Geometry.unity demonstrating runtime collider deformations. In the demo, the geometry of various types of colliders are modified via the new ColliderBakeTransformAuthoring component, which lets you create cyclic animations during which a game object's collider and its visuals are deformed over time. This is achieved through use of the Collider.BakeTransform function, which applies an affine transformation to a collider, correspondingly rotating, translating, scaling and shearing its geometry in the process.Modify Collider Geometry.unity demonstrating runtime collider deformations. In the demo, the geometry of various types of colliders are modified via the new ColliderBakeTransformAuthoring component, which lets you create cyclic animations during which a game object's collider and its visuals are deformed over time. This is achieved through use of the Collider.BakeTransform function, which applies an affine transformation to a collider, correspondingly rotating, translating, scaling and shearing its geometry in the process.4e. Single Ragdoll with a GameObject ragdoll created using the built-in physics Ragdoll Wizard and simulated using Unity Physics for DOTS on one side and the built-in GameObject physics on the other.5m. Collider Modifications to show how to create mesh colliders during runtimePhysics_MeshCollider.csPhysics_MeshCollider.csPhysics_MeshCollider.cs4d. Ragdoll scene to 4d. Ragdolls for clarity.Mouse Hover Authoring component was improved and now works also when hovering over physics entities whose rendering components are located in a child entity. Consequently, the previously disabled Mouse Hover Authoring component has now been enabled in the 4d. Ragdolls scene.5b. Change Box Collider Size scene to use the new Physics Force Unique Collider component5. Modify section now has a new section called 5g. Runtime Collider Modifications.5g1. Change Collider Material - Bouncy Boxes. This demo instantiates prefabs containing unique colliders and modifies collider blob data during runtime5g. Change Collider Filter demo has been renamed to 5g2. Unique Collider Blob Sharing. The focus of this demo is how collider data is shared, rather than how the CollisionFilter is modified.5g2. Unique Collider Blob Sharing demo uses the new MakeUnique method in SpawnExplosionAuthoring.cs. The manual management of new colliders is no longer necessary.5m. Collider Modification demo to the 5g. Runtime Collider Modifications section and renamed it to 5g3. Runtime Collider CreationMotion Properties - Mass demo with an additional seesaw created using built-in physics authoring components (in grey) alongside the already existing
seesaw that uses custom physics authoring components (in yellow).5g4. Runtime Collision Filter Modification. This demo shows how to modify a CollisionFilter during runtime.Tests/Animation/Scripts/AnimationPhysicsSystem.csTests/MultipleWorlds/ClientServer/Scripts/ServerPhysicsSystem.csTests/MultipleWorlds/CustomPhysicsGroup/MultiWorldMousePicker.csTests/MultipleWorlds/CustomPhysicsGroup/UserWorldCreator.csTests/SamplesTest/CreatePhysicsPerformanceTests.unity: Fixed an index out of range bug in the OnUpdate method of the systemQueryTester.cs, which is used in demos 3a. All Hits Distance Test / 3b. Cast Test / 3c. Closest Hit Distance Test, where debug draw lines were not drawing the results of the queries. Any system using drawing features of the PhysicsDebugDisplaySystem must update this system within the PhysicsDebugDisplayGroup.PhysicsBodyAuthoring and PhysicsShapeAuthoring components, is no longer embedded in the Unity Physics package API. Instead it is provided as a Unity Physics package sample called Custom Physics Authoring. This sample is now automatically imported into the PhysicsSamples project under Assets/Samples/Unity Physics/<package version>/Custom Physics Authoring. If you want to update the Unity Physics package in the PhysicsSamples project make sure to import the new version of this sample using the Package Manager under the Samples tab after the update and then delete the previous version of this sample from the project.Assets/Demos/4. Joints/4c. Motors.SimulationValidationAuthoring component for physics behavior validation testing, which can be used to confirm that joints behave as expected and that rigid bodies are at rest if desired.Assets folder:
Tests/Stacking/BasicStacks.unityTests/JointTest/LimitedHinge/LimitedHingeSub.unityTests/JointTest/Prismatic.unityTests/JointTest/Hinge.unityDemos/4. Joints/4a. Joints Parade/4a. Joints Parade SubScene.unityDemos/4. Joints/4c. Motors/4c3. Linear Velocity Motor.unityDemos/4. Joints/4c. Motors/4c4. Angular Velocity Motor.unityDemos/5. Modify/5f. Change Surface Velocity.unity fixed a dependency in the DisplayConveyorBeltJob0.50.0-preview.24 to 0.51.0-preview.320.50.0-preview.24 to 0.51.0-preview.321.2.3-pre.24 to 1.3.10.50.0-preview.24 to 0.51.0-preview.320.50.0-preview.8 to 0.51.0-preview.320.50.0-preview.24 to 0.51.0-preview.3210.8.1 to 12.1.72020.3.30f1 to 2021.3.4f12021.3.4f1 a new material substitutes the shader while the errors gets fixed.0.50.0-preview.240.50.0-preview.241.2.3-pre.240.50.0-preview.240.50.0-preview.80.50.0-preview.2410.8.1ImmediatePhysicsWorldStepper utility class for running physics simulation immediately on the current thread.ProjectIntoFutureOnCueSystem in Pool demo to use ImmediatePhysicsWorldStepper.PhysicsWorld to simulate a small number of non-critical bodies for animation purposes (character's ponytail and scabbard). DriveAnimationBodySystem syncs critical bodies between default and side physics world (character's head and torso) and prepares the data for non-critical bodies (position and velocity correction for ponytail and scabbard). AnimationPhysicsSystem performs single-threaded PhysicsWorld building, simulation and export to ECS components. The demo shows 2 variants of physically animated ponytail: with position and velocity corrections (green) and without them (blue).DriveGhostBodySystem drives ghost bodies by position or velocity, the ratio (position vs velocity) is determined by First Order Gain setting in Drive Ghost Body Authoring script on the client ghost body game object. ServerPhysicsSystem is the key system that builds, simulates and exports server physics world.
The demo shows different kinematic bars (client-only, dynamic and kinematic ghost) rotating and pushing various speheres around (client-only, dynamic and kinematic ghosts driven by position, velocity and both equally).0.21.0-preview.12.0.70.13.0-preview.30Dependencies
0.13.0-preview to 0.14.0-preview.10.12.0-preview.42 to 0.13.0-preview.171.4.4 to 1.5.0Refactored the CollisionEvent and TriggerEvent demos to make the Stateful events clearer.
PhysicsShapeAuthoring component, andStatefulCollisionEventBufferAuthoring component to that entity (and select if details should be calculated or not)StatefulCollisionEventsPhysicsShapeAuthoring component, andStatefulTriggerEventBufferAuthoring component to that entityStatefulTriggerEventsDependencies
0.18.0-preview.3 to 0.20.0-preview.40.12.0-preview.4 to 0.13.0-preview0.10.0-preview.21 to 0.12.0-preview.420.1.0-preview.17 to 0.1.0-preview.20Added a new MouseHoverAuthoring script to help highlight the extra CompoundCollider.Child.Entity field and PhysicsRenderEntity component data. Check out the simple 1b. Representations and more complex 2a2. Collider Parade - Advanced demos scene for example of setup variations.
Added Tests/VelocityClipping/VelocityClippingStacking demo to showcase a simple replacement for the removed SimulationCallbacks.Phase.PostSolveJacobians. This demo does a really simple velocity clipping and the point is not to showcase stacking (which is covered with Tests/Stacking demos) but instead to show how to achieve the effect similar to previous callback without using the callback itself.
Added Tests/SystemScheduling/SchedulingSample which shows how jobs that interact with physics runtime data (stored in PhysicsWorld) should be scheduled.
0.18.0-preview.3 to 0.19.0-preview.50.9.0-preview.1 to 0.12.0-preview.40.10.0-preview.21 to 0.11.0-preview.405g. Change Collider Filter sample showing explosion use case and the importance of collision filters in that case. Setting the force to 0 in SpawnExplosionAuthoring causes a performance spike because when the filters get set to default, a lot of bodies are pentetrating each other.0.7.0-preview.24 to 0.10.0-preview.210.16.0-preview.3 to 0.18.0-preview.1LimitDOF joint into core Unity Physics packageFreeHingeJoint.Create authoring script not setting the BodyFrame.PerpendicularAxisRaycastCar demo has issues that sometimes produce NaN values.1b. Respresentations sample highlighting graphical and physical representations of the world.1c. Conversion sample, along with worked examples moving from GameObjects (Data & Logic) to DOTS.
1c1. GameObjects GravityWell sample - showing Data conversion working but not Logic conversion.1c2. Covertible GravityWell sample - showing Data & Logic conversion.1c3. DOTS GravityWell sample - showing same scene without GameObject conversion.2a2. Collider Parade - Advanced sample with extra setup samples involving multiple graphics mesh and/or multiple physics shapes.4. Joints\Ragdoll demo to use new ragdoll joint interface and allow modification of joint limits.5d. Change Velocity demo showing a local velocity change.5f. Change Surface Velocity sample highlighting a conveyor belt use case with no moving parts.0.14.0-preview.20.7.0-preview.10.4.0-preview.8 to 0.5.1-preview.18PrismaticJoint example no longer includes MinDistanceFromAxis or MaxDistanceFromAxis parameters.RagdollJoint example now takes perpendicular limits in the range of (-90, 90) rather than (0, 180).5d. Kinematic Motion to illustrate different ways of moving kinematic bodies.2d1a. Triggers - Change Material2d1b. Triggers - Portals2d1c. Triggers - Force Field2d2a. Collision Events - Event States added to demonstrate new collision event approach.CollisionResponse.None collision response on its body to avoid reporting duplicated collision/trigger events coming from the physics engine.Demos/2. Setup/2b. Motion Properties/2b1. Motion Properties - Mass, Tests/Pyramids and a group of demos under Tests/Stacking now showcase new solver stabilization features/strengths and weaknesses/trade-offs.0.3.4-preview.24 to 0.4.0-preview.81.0.0-preview.5 to 1.0.0-preview.6StiffSpringJoint to LimitedDistanceJoint to reflect changes in API.0.9.6-preview to 1.0.0-preview.57.1.6 to 7.1.70.2.0-preview to 0.3.0-preview0.3.3-preview.11 to 0.3.4-preview.24CharacterControllerUtilities.CheckSupport() now uses a collider castCharacterControllerAuthoring.MaxMovementSpeed to avoid large velocities coming from penetration recovery.2019.3 below 0b5 it might be required to update the Lightweight RP package (com.unity.render-pipelines.lightweight) to version 7.0.1 and reimport the Assets/Common folder.2019.3.0b1 or later, it is currently required to upgrade the following packages:
0.1.1-preview7.0.15a. Change Motion Type demo illustrating how to swap the motion type of a rigid body.5b. Change Collider Size demo shows how to dynamically resize a sphere collider.5c. Change Collider Type demo shows a body's collider changing between a cube and a sphere.4c. Newton's Cradle demo4d. Abacus demo1. Hello World now uses convex hulls for letters.
2b1. Motion Properties - Mass shows a number of seesaws in anticipation of future stacking improvements.
2b6. Motion Properties - Inertia Tensor adds an example of infinite mass dynamic objects - i.e lock rotations.
2c2. Material Properties - Restitution shows the changes to the restitution model, with complex bodies bouncing more with high restitution values.
2c3. Material Properties - Collision Filters shows the filtering setup between potentially colliding objects
2d1. Events - Triggers shows a simple trigger use case that changes a bodies gravity fractor when inside the volume.
2d1. Triggers - Change Material shows set of triggers that change a bodies material when they enter the trigger volume.2d2. Triggers - Portals shows set of triggers that transform a body to a new location and orientation while preserving local velocity.2d3. Triggers - Force Field shows a trigger volume acting and a tornado moving through the world.2d2. Events - Contacts shows a simple collision event used to apply an impulse to any body colliding with the tagged 'repulsor' body.
4a. Joints Parade demo shows the Prismatic Joint now locks rotation.
4b. Limit DOF demo shows the new Limit DOF Joint, locking body rotation and translation to various axes.
4c. Newton's Cradle demo shows how to cheat collision response to create a desktop toy.
4d. Abacus shows a desktop toy as an extreme test of the Limit DOF Joint.
5. Modify demos have been changed to use the new jobify approach to modifying simulation data.
Mouse Pick Behavior now ignores Static and Trigger bodies, illustrating a custom hit collector.
Joint Editors now lock the connected body offset to the local offsets, as suggested by the UI.
Debug Display changes include:
Various tests have been added to confirm API changes and as comparisons for WIP and the upcoming Havok Physics release.