Legacy Documentation: Version 2018.2 (Go to current version)
3D Physics Reference
Capsule Collider
Other Versions

Box Collider

Switch to Scripting

The Box Collider is a basic cube-shaped 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
primitive.

Properties

Property: Function:
Is Trigger If enabled, this ColliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary
is used for triggering events, and is ignored by the physics engineA system that simulates aspects of physical systems so that objects can accelerate correctly and be affected by collisions, gravity and other forces. More info
See in Glossary
.
MaterialAn asset that defines how a surface should be rendered, by including references to the Textures it uses, tiling information, Color tints and more. The available options for a Material depend on which Shader the Material is using. More info
See in Glossary
Reference to the Physics Material that determines how this Collider interacts with others.
Center The position of the Collider in the object’s local space.
Size The size of the Collider in the X, Y, Z directions.

Details

Box colliders are obviously useful for anything roughly box-shaped, such as a crate or a chest. However, you can use a thin box as a floor, wall or ramp. The box shape is also a useful element in a compound collider.

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