Use the Physics Manager to apply global settings for 3D physics. To access it, go to Edit > Project Settings > Physics. To manage global settings for 2D physics, use the Physics 2D Manager.
The settings of the PhysicsManager define limits on the accuracy of the physical simulation. Generally speaking, a more accurate simulation requires more processing overhead, so these settings offer a way to trade off accuracy against performance. See the Physics section of the manual for further information.
|Gravity||使用 x、y 和 z 轴设置应用于所有刚体组件的重力。对于真实的重力设置，应将负数应用于 y 轴。重力以每平方秒的世界单位定义。
注意：如果增大重力，可能还需要增大 Default Solver Iterations 值以保持稳定的接触。
|Default Material||Use this field to define the default Physics Material that is used if none has been assigned to an individual Collider.|
|Bounce Threshold||Use this to set a velocity value. If two colliding objects have a relative velocity below this value, they do not bounce off each other. This value also reduces jitter, so it is not recommended to set it to a very low value.|
|Sleep Threshold||Use this to set a global energy threshold, below which a non-kinematic Rigidbody (that is, one that is not controlled by the physics system) may go to sleep. When a Rigidbody is sleeping, it is not updated every frame, making it less resource-intensive. If a Rigidbody’s kinetic energy divided by its mass is below this threshold, it is a candidate for sleeping.|
|Default Contact Offset||Use this to set the distance the collision detection system uses to generate collision contacts. The value must be positive, and if set too close to zero, it can cause jitter. This is set to 0.01 by default. Colliders only generate collision contacts if their distance is less than the sum of their contact offset values.|
|Default Solver Iterations||Solvers are small physics engine tasks which determine a number of physics interactions, such as the movements of joints or managing contact between overlapping Rigidbody components. Use Default Solver Iterations to define how many solver processes Unity runs on every physics frame. This affects the quality of the solver output and it’s advisable to change the property in case non-default
|Default Solver Velocity Iterations||Use this to set how many velocity processes a solver performs in each physics frame. The more processes the solver performs, the higher the accuracy of the resulting exit velocity after a Rigidbody bounce. If you experience problems with jointed Rigidbody components or Ragdolls moving too much after collisions, try increasing this value.|
|Queries Hit Backfaces||Tick the checkbox if you want physics queries (such as
|Queries Hit Triggers||Tick the checkbox if you want physics hit tests (such as Raycasts, SphereCasts and SphereTests) to return a hit when they intersect with a Collider marked as a Trigger. Individual raycasts can override this behavior. This setting is ticked by default.|
|Enable Adaptive Force||The adaptive force affects the way forces are transmitted through a pile or stack of objects, to give more realistic behaviour. Tick this box to enable the adaptive force. This setting is unticked by default.|
|Contacts Generation||Choose a contact generation method:
Persistent Contacts Manifold (PCM): Regenerates fewer contacts every physics frame and shares more contact data across frames. The PCM contacts generation path is also more accurate, and usually produces better collision feedback in most of the cases. See Nvidia documentation on Persistent Contact Manifold for more information.
Legacy Contacts Generation: Generates contacts using the separating axis theorem (see dyn4j.org’s guide to SAT).
PCM is more efficient, but for projects made in versions of Unity earlier than Unity 5.5, you might find it easier to continue using SAT, to avoid needing to retweak physics slightly. PCM can result in a slightly different bounce, and fewer useless contacts end up in the contacts buffers (that is, the arrays you get in the Collision instance passed to
|Auto Simulation||Run the physics simulation automatically or allow explicit control over it|
|Auto Sync Transforms||Automatically sync transform changes with the physics system whenever a Transform component changes.|
|Contact Pairs Mode||Select the type of contact pair generation to use:
Default Contact Pairs: Receive collision and trigger events from all contact pairs except kinematic-kinematic and kinematic-static pairs.
Enable Kinematic Kinematic Pairs: Receive collision and trigger events from kinematic-kinematic contact pairs.
Enable Kinematic Static Pairs: Receive collision and trigger events from kinematic-static contact pairs.
Enable All Contact Pairs:Receive collision and trigger events from all contact pairs.
|Broadphase Type||Choose which broad-phase algorithm to use in the physics simulation: Sweep and Prune Broadphase or Multibox Pruning Broadphase. Multi-box pruning uses a grid, and each grid cell performs sweep-and-prune. This usually helps improve performance if, for example, there are many GameObjects in a flat world. For more information, see NVIDIA’s documentation on PhysX SDK and Rigid Body Collision.|
|World Bounds||Define the 2D grid that encloses the world to prevent far away objects from affecting each other when using the Multibox Pruning Broadphase algorithm. This option is only available when you set Broadphase Type to Multibox Pruning Broadphase.|
|World Subdivisions||The number of cells along the x and z axis in the 2D gri__ algorithm. This option is only available when you set Broadphase Type to Multibox Pruning Broadphase.|
|Layer Collision Matrix||Use this to define how the layer-based collision detection system behaves.|
|Cloth Inter-Collision||Control cloth particle Distance and Stiffness when setting up particles for Cloth intercollision.|
在 5.5 版中添加的设置：Default Solver Iterations、Default Solver Velocity Iterations、Queries Hit Backfaces、Enable PCM
在 2017.4 版中更新了 Physics Manager 设置文档