CapsuleCollider

class in UnityEngine

/

Hereda de:Collider

Cambiar al Manual

Descripción

A capsule-shaped primitive collider.

Capsules are cylinders with a half-sphere at each end.

See Also: BoxCollider, SphereCollider, PhysicMaterial, Rigidbody.

Variables

centerThe center of the capsule, measured in the object's local space.
directionLa dirección de la cápsula.
heightThe height of the capsule measured in the object's local space.
radiusThe radius of the sphere, measured in the object's local space.

Miembros heredados

Variables

attachedArticulationBodyThe articulation body the collider is attached to.
attachedRigidbodyEl rigidbody el cual tiene el collider adjunto.
boundsThe world space bounding volume of the collider (Read Only).
contactOffsetEl valor de contacto de desfase de este collider.
enabledEnabled Colliders will collide with other Colliders, disabled Colliders won't.
isTriggerEs el collider un trigger?
materialEl material utilizado por el collider.
sharedMaterialEl material de física compartido de este collider
gameObjectEl game object que tiene este componente adjunto. Un componente siempre está adjunto a un game object.
tagEl tag de este game object.
transformThe Transform attached to this GameObject.

Funciones Públicas

ClosestPointReturns a point on the collider that is closest to a given location.
ClosestPointOnBoundsEl punto más cercano a la caja delimitadora del collider adjunto.
RaycastEmite un Ray que ignora todos los Colliders excepto este.
BroadcastMessageLlama al método denominado methodName de todos los MonoBehaviour en este game objecto en cualquiera de sus hijos.
CompareTag¿Este game object está etiquetado con tag?
GetComponentReturns the component of Type type if the GameObject has one attached, null if it doesn't. Will also return disabled components.
GetComponentInChildrenRetorna el componente de tipo type en el GameObject o cualquiera de sus hijos utilizando depth first search (busqueda de profundidad).
GetComponentInParentRetorna el componente de tipo type en el GameObject o cualquiera de sus padres.
GetComponentsRetorna todos los componentes de tipo type en el GameObject.
GetComponentsInChildrenRetorna todos los componentes de tipo type en el GameObject o cualquiera de sus hijo.
GetComponentsInParentRetorna todos los componentes de tipo type en el GameObject o cualquiera de sus padres.
SendMessageLlama al método denominado methodName en cada MonoBehaviour de este game object.
SendMessageUpwardsLlama al método denominado methodName en todos los MonoBehaviour de este juego y en todos los ancestros del behaviour.
TryGetComponentGets the component of the specified type, if it exists.

Mensajes

OnCollisionEnterOnCollisionEnter se llama cuando el Collider o Rigidbody entra en contacto con otro Collider/Rigidbody.
OnCollisionExitOnCollisionExit se llama cuando este collider/rigidbody ha dejado de tocar otro rigidbody/collider.
OnCollisionStayOnCollisionStay se llama cada frame para cada collider/rigidbody que está tocando rigidbody/collider.
OnTriggerEnterWhen a GameObject collides with another GameObject, Unity calls OnTriggerEnter.
OnTriggerExitOnTriggerExit se llama cunado el Collider other ha parado de tocar el trigger.
OnTriggerStayOnTriggerStay is called almost all the frames for every Collider other that is touching the trigger. The function is on the physics timer so it won't necessarily run every frame.