Skip to content

API > BoxCollider


BoxCollider⚓︎

BoxCollider inherits from Collider

A box-shaped primitive collider. Unity BoxCollider

Members⚓︎

Properties⚓︎

Name Description
BoxCollider.centerProperty The center of the box, measured in the object's local space.
BoxCollider.sizeProperty The size of the box, measured in the object's local space.

Inherited Members⚓︎

Inherited Properties⚓︎

Name Description
BoxCollider.attachedRigidbodyProperty The rigidbody the collider is attached to.
BoxCollider.boundsProperty The world space bounding volume of the collider (Read Only).
BoxCollider.contactOffsetProperty Contact offset value of this collider.
BoxCollider.enabledProperty Enabled Colliders will collide with other Colliders, disabled Colliders won't.
BoxCollider.isTriggerProperty Is the collider a trigger?
BoxCollider.materialProperty The material used by the collider.
BoxCollider.sharedMaterialProperty The shared physic material of this collider.
BoxCollider.gameObjectPropertyReadonly Property The game object this component is attached to. A component is always attached to a game object.
BoxCollider.tagPropertyReadonly Property The tag of this game object.
BoxCollider.transformPropertyReadonly Property The Transform attached to this GameObject.
BoxCollider.hideFlagsProperty Should the object be hidden, saved with the Scene or modifiable by the user?
BoxCollider.nameProperty The name of the object.

Inherited Methods⚓︎

Name Description
BoxCollider.ClosestPoint(position)Method Returns a point on the collider that is closest to a given location.
BoxCollider.ClosestPointOnBounds(position)Method The closest point to the bounding box of the attached collider.
BoxCollider.Raycast(ray, maxDistance)Method Casts a Ray that ignores all Colliders except this one.
BoxCollider.BroadcastMessage(methodName, parameter=nil)Method Calls the method named methodName on every Lua Script in this game object or any of its children.
BoxCollider.CompareTag(tag)Method Is this game object tagged with tag ?
BoxCollider.GetAllLuaScripts()Method Returns an array of all Lua scripts that attached to the game object.
BoxCollider.GetComponent(type)Method Returns the component of Type type if the game object has one attached, nil if it doesn't.
BoxCollider.GetComponentInChildren(t)Method Returns the component of Type type in the GameObject or any of its children using depth first search.
BoxCollider.GetComponentInParent(t)Method Returns the component of Type type in the GameObject or any of its parents.
BoxCollider.GetComponents(type)Method Returns all components of Type type in the GameObject.
BoxCollider.GetComponentsInChildren(t)Method Returns all components of Type type in the GameObject or any of its children.
BoxCollider.GetComponentsInParent(t)Method Returns all components of Type type in the GameObject or any of its parents.
BoxCollider.SendMessage(methodName, value=nil)Method Calls the method named methodName on every Lua Script in this game object.
BoxCollider.SendMessageUpwards(methodName, value=nil)Method Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour.
BoxCollider.TryGetComponent(type)Method Gets the component of the specified type, if it exists.
BoxCollider.GetInstanceID()Method Returns the instance id of the object.