Skip to content

Collider

Defines the collision shape of a GameObject for physics and trigger detection. In VRChat worlds, colliders are essential for player interaction zones, trigger volumes, and physical boundaries.

Properties

PropertyTypeAccess
attachedArticulationBodyUnityEngineArticulationBodyget
attachedRigidbodyRigidbodyget
boundsUnityEngineBoundsget
contactOffsetfloatget, set
enabledboolget, set
excludeLayersUnityEngineLayerMaskget, set
gameObjectGameObjectget
hasModifiableContactsboolget, set
includeLayersUnityEngineLayerMaskget, set
isTriggerboolget, set
layerOverridePriorityintget, set
materialUnityEnginePhysicMaterialget, set
namestringget, set
providesContactsboolget, set
sharedMaterialUnityEnginePhysicMaterialget, set
transformTransformget

attachedRigidbody

The Rigidbody attached to this collider’s GameObject, or null if none.

let rb: Rigidbody = collider.attachedRigidbody

bounds

The world-space bounding box of the collider.

let b: Bounds = collider.bounds

enabled

Whether this collider is active. Disabled colliders are ignored by physics.

collider.enabled = false

isTrigger

When true, the collider acts as a trigger zone instead of a solid surface.

collider.isTrigger = true

Methods

ClosestPoint

ClosestPoint(position: Vector3) -> Vector3

Returns the closest point on the collider surface to a given position.

let closest: Vector3 = collider.ClosestPoint(playerPos)

ClosestPointOnBounds

ClosestPointOnBounds(position: Vector3) -> Vector3

Equals

Equals(other: object) -> bool

GetComponent

GetComponent(type: string) -> UnityEngineComponent
GetComponent(type: SystemType) -> UnityEngineComponent
GetComponent(type: SystemType) -> UnityEngineObject

GetComponentInChildren

GetComponentInChildren(includeInactive: bool, type: SystemType) -> UnityEngineObject
GetComponentInChildren(t: SystemType, includeInactive: bool) -> UnityEngineComponent
GetComponentInChildren(t: SystemType) -> UnityEngineComponent
GetComponentInChildren(type: SystemType) -> UnityEngineObject

GetComponentInParent

GetComponentInParent(includeInactive: bool, type: SystemType) -> UnityEngineObject
GetComponentInParent(t: SystemType, includeInactive: bool) -> UnityEngineComponent
GetComponentInParent(t: SystemType) -> UnityEngineComponent
GetComponentInParent(type: SystemType) -> UnityEngineObject

GetComponents

GetComponents(results: SystemCollectionsGenericList`1[[UnityEngineObject, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]], type: SystemType) -> void
GetComponents(type: SystemType, results: SystemCollectionsGenericList`1[[UnityEngineComponent, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> void
GetComponents(type: SystemType) -> UnityEngineComponent[]
GetComponents(type: SystemType) -> UnityEngineObject[]

GetComponentsInChildren

GetComponentsInChildren(results: SystemCollectionsGenericList`1[[UnityEngineObject, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]], type: SystemType) -> void
GetComponentsInChildren(includeInactive: bool, result: SystemCollectionsGenericList`1[[UnityEngineObject, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> void
GetComponentsInChildren(includeInactive: bool, type: SystemType) -> UnityEngineObject[]
GetComponentsInChildren(t: SystemType, includeInactive: bool) -> UnityEngineComponent[]
GetComponentsInChildren(t: SystemType) -> UnityEngineComponent[]
GetComponentsInChildren(type: SystemType) -> UnityEngineObject[]

GetComponentsInParent

GetComponentsInParent(includeInactive: bool, results: SystemCollectionsGenericList`1[[UnityEngineObject, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> void
GetComponentsInParent(includeInactive: bool, type: SystemType) -> UnityEngineObject[]
GetComponentsInParent(t: SystemType, includeInactive: bool) -> UnityEngineComponent[]
GetComponentsInParent(t: SystemType) -> UnityEngineComponent[]
GetComponentsInParent(type: SystemType) -> UnityEngineObject[]

GetHashCode

GetHashCode() -> int

GetInstanceID

GetInstanceID() -> int

GetType

GetType() -> SystemType

Raycast

Raycast(ray: UnityEngineRay, hitInfo: UnityEngineRaycastHit, maxDistance: float) -> bool

Casts a ray against this collider and returns hit information.

// Use Physics.Raycast for general raycasting instead

ToString

ToString() -> string