Version: 2023.2
Language : English
Box Collider component reference
Terrain Collider component reference

Capsule Collider component reference

Switch to Scripting

The Capsule Collider is made of two half-spheres joined together by a cylinder. It is the same shape as the Capsule 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. 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.
Radius The radius of the Collider’s local width.
Height The total height of the Collider.
Direction The axis of the capsule’s lengthwise orientation in the object’s local space.

Details

You can adjust the Capsule Collider’s Radius and Height independently of each other. It is used in the Character ControllerA simple, capsule-shaped collider component with specialized features for behaving as a character in a game. Unlike true collider components, a Rigidbody is not needed and the momentum effects are not realistic. More info
See in Glossary
and works well for poles, or can be combined with other Colliders for unusual shapes.

A standard Capsule Collider
A standard Capsule Collider

CapsuleCollider

Box Collider component reference
Terrain Collider component reference
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961