Version: 2020.3
Language : English
Circle Collider 2D
Polygon Collider 2D reference

Box Collider 2D

Switch to Scripting

The Box 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
2D
is a Collider that interacts with the 2D physics system. It is a rectangle in shape with a defined position, width and height in the local coordinate space of a SpriteA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
. Note that the rectangle is axis-aligned, with its edges parallel to the X or Y axes of local space.

Property Function
Material A physics Material that determines properties of collisionsA 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
, such as friction and bounce.
Is Trigger Check this box if you want the Box ColliderA cube-shaped collider component that handles collisions for GameObjects like dice and ice cubes. More info
See in Glossary
2D to behave as a trigger.
Used by Effector Check this box if you want the Box Collider 2D to be used by an attached Effector 2D component.
Used by Composite Tick this checkbox if you want this Collider to be used by an attached Composite Collider 2D.

When you enable Used by Composite, other properties disappear from the Box Collider 2D component, because they are now controlled by the attached Composite Collider 2D. The properties that disappear from the Box Collider 2D are Material, Is Trigger, Used By Effector, and Edge Radius.
Auto Tiling Tick this checkbox if the Sprite RendererA component that lets you display images as Sprites for use in both 2D and 3D scenes. More info
See in Glossary
component for the selected Sprite has the Draw Mode set to Tiled. This enables automatic updates to the shape of the Collider 2D, meaning that the shape is automatically readjusted when the Sprite’s dimensions change. If you don’t enable Auto Tiling, the Collider 2D geometry doesn’t automatically repeat.
Offset Set the local offset of the Collider 2D geometry.
Size Set the size of the box in local space units.
Edge Radius Controls a radius around edges, so that vertices are circular. This results in a larger Collider 2D with rounded convex corners. The default value for this setting is 0 (no radius).
Circle Collider 2D
Polygon Collider 2D reference
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961