CapsuleCollider
A capsule-shaped primitive collider.
Read time 7 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
- Inherits from: Collider
[RequireComponent(typeof(Transform))]public class CapsuleCollider : Collider
Remarks
Capsules are cylinders with a half-sphere at each end.
Properties
Property | Description |
|---|---|
| center | The center of the capsule, measured in the object's local space. |
| direction | The direction of the capsule. |
| height | The height of the capsule measured in the object's local space. |
| radius | The radius of the sphere, measured in the object's local space. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |