Legacy Documentation: Version 2018.1 (Go to current version)
Physics Manager
Quality Settings
Other Versions

Physics 2D Settings

The Physics 2D Settings allow you to provide global settings for 2D physics (menu: Edit > Project Settings > Physics 2D).

(There is also a corresponding Physics Manager for 3D projects.)

Properties

Property: Function:
Gravity The amount of gravity applied to all Rigidbody 2D GameObjects. Generally, gravity is only set for the negative direction of the y-axis.
Default Material The default Physics Material 2D that is used if none has been assigned to an individual Collider 2D.
Velocity Iterations The number of iterations made by the physics engine to resolve velocity effects. Higher numbers result in more accurate physics but at the cost of CPU time.
Position Iterations The number of iterations made by the physics engine to resolve position changes. Higher numbers result in more accurate physics but at the cost of CPU time.
Velocity Threshold Collisions with a relative velocity lower than this value is treated as inelastic collisions (that is, the colliding GameObjects do not bounce off each other).
Max Linear Correction The maximum linear position correction used when solving constraints (from a range between 0.0001 to 1000000). This helps to prevent overshoot.
Max Angular Correction The maximum angular correction used when solving constraints (froma range between 0.0001 to 1000000). This helps to prevent overshoot.
Max Translation Speed The maximum linear speed of a Rigidbody 2D GameObject during any physics update.
Max Rotation Speed The maximum rotation speed of a Rigidbody 2D GameObject during any physics update.
Min Penetration For Penalty The minimum contact penetration radius allowed before any separation impulse force is applied.
Baumgarte Scale Scale factor that determines how fast collision overlaps are resolved.
Baumgarte Time of Impact Scale Scale factor that determines how fast time-of-impact overlaps are resolved.
Time to Sleep The time (in seconds) that must pass after a Rigidbody 2D stops moving before it goes to sleep.
Linear Sleep Tolerance The linear speed below which a Rigidbody 2D goes to sleep after the Time to Sleep elapses.
Angular Sleep Tolerance The rotational speed below which a Rigidbody 2D goes to sleep after Time to Sleep elapses.
Queries Hit Triggers Check this box to enable Collider 2Ds marked as Triggers to return a hit when any physics queries (such as Linecasts or Raycasts) intersect with them. Leave it unchecked for these queries to not return a hit.
Queries Start In Colliders Check this box to enable physics queries that start inside a Collider 2D to detect the collider they start in.
Change Stops Callbacks Check this box to stop reporting collision callbacks immediately if any of the GameObjects involved in the collision are deleted or moved.
Layer Collision Matrix Defines how the Layer-based collision detection system behaves.

Notes

The Physics 2D Settings 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.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答