API > CapsuleCollider
CapsuleCollider⚓︎
CapsuleCollider inherits from Collider
A capsule-shaped primitive collider.
Members⚓︎
Properties⚓︎
Name | Description |
---|---|
CapsuleCollider .center |
The center of the capsule, measured in the object's local space. |
CapsuleCollider .direction |
The direction of the capsule. |
CapsuleCollider .height |
The height of the capsule measured in the object's local space. |
CapsuleCollider .radius |
The radius of the sphere, measured in the object's local space. |
Inherited Members⚓︎
Inherited Properties⚓︎
Name | Description |
---|---|
CapsuleCollider .attachedRigidbody |
The rigidbody the collider is attached to. |
CapsuleCollider .bounds |
The world space bounding volume of the collider (Read Only). |
CapsuleCollider .contactOffset |
Contact offset value of this collider. |
CapsuleCollider .enabled |
Enabled Colliders will collide with other Colliders, disabled Colliders won't. |
CapsuleCollider .isTrigger |
Is the collider a trigger? |
CapsuleCollider .material |
The material used by the collider. |
CapsuleCollider .sharedMaterial |
The shared physic material of this collider. |
CapsuleCollider .gameObject |
The game object this component is attached to. A component is always attached to a game object. |
CapsuleCollider .tag |
The tag of this game object. |
CapsuleCollider .transform |
The Transform attached to this GameObject. |
CapsuleCollider .hideFlags |
Should the object be hidden, saved with the Scene or modifiable by the user? |
CapsuleCollider .name |
The name of the object. |
Inherited Methods⚓︎
Name | Description |
---|---|
CapsuleCollider .ClosestPoint(position) |
Returns a point on the collider that is closest to a given location. |
CapsuleCollider .ClosestPointOnBounds(position) |
The closest point to the bounding box of the attached collider. |
CapsuleCollider .Raycast(ray, maxDistance) |
Casts a Ray that ignores all Colliders except this one. |
CapsuleCollider .BroadcastMessage(methodName, parameter=nil) |
Calls the method named methodName on every Lua Script in this game object or any of its children. |
CapsuleCollider .CompareTag(tag) |
Is this game object tagged with tag ? |
CapsuleCollider .GetAllLuaScripts() |
Returns an array of all Lua scripts that attached to the game object. |
CapsuleCollider .GetComponent(type) |
Returns the component of Type type if the game object has one attached, nil if it doesn't. |
CapsuleCollider .GetComponentInChildren(t) |
Returns the component of Type type in the GameObject or any of its children using depth first search. |
CapsuleCollider .GetComponentInParent(t) |
Returns the component of Type type in the GameObject or any of its parents. |
CapsuleCollider .GetComponents(type) |
Returns all components of Type type in the GameObject. |
CapsuleCollider .GetComponentsInChildren(t) |
Returns all components of Type type in the GameObject or any of its children. |
CapsuleCollider .GetComponentsInParent(t) |
Returns all components of Type type in the GameObject or any of its parents. |
CapsuleCollider .SendMessage(methodName, value=nil) |
Calls the method named methodName on every Lua Script in this game object. |
CapsuleCollider .SendMessageUpwards(methodName, value=nil) |
Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour. |
CapsuleCollider .TryGetComponent(type) |
Gets the component of the specified type, if it exists. |
CapsuleCollider .GetInstanceID() |
Returns the instance id of the object. |
Extra Detail⚓︎
Capsules are cylinders with a half-sphere at each end.