包含此页的版本:
不含此页的版本:
Reduce collisionA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info
See in Glossary calculation overhead by configuring interaction rules between GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary with collision layers.
Use the Layer Collision Matrix to control how objects on different layers interact with each other in the physics simulation. You can assign objects to a layer in their InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary, and then use the Layer Collision Matrix to define the interaction rules between them. Defining how objects interact on a layer basis can reduce the number of overlap checks and collision calculations performed each frame.
The benefits of layer-based filtering are:
To begin optimizing with collision layers, first define and assign layers to your GameObjects. Then, configure how these layers interact in the Layer Collision Matrix. This matrix directly tells the physics system which layers must ignore each other during collision checks, which effectively culls potential interactions early in the simulation.
The recommended best practices for layer-based collision detectionAn automatic process performed by Unity which determines whether a moving GameObject with a Rigidbody and collider component has come into contact with any other colliders. More info
See in Glossary are:
To learn more, refer to Layer-based collision detection.
To define and assign layers to your GameObjects and configure the Layer Collision Matrix: