• Studio

  • Studio API

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Globals

    Collider

    Inherits from:

    Collider acts as an invisible force field around GameObjects, essential for interactions like collisions and input responses. Integrating with Rigidbody, Colliders allow objects to engage physically with the game world, simulating real-world physics. Various Collider types match different object shapes, enabling precise interaction management. Colliders can be set as triggers for event detection without physical response, offering versatility in gameplay mechanics. Refer to the official Unity Collider documentation for in-depth guidance. Unity's Collider Documentation

    Properties

    attachedRigidbody

    ClientOnly
    ReadOnly

    Points to the Rigidbody component associated with the Collider, crucial for physics interactions. Unity's Collider.attachedRigidbody Documentation

    bounds

    ClientOnly
    ReadOnly

    Retrieves the Collider's world space bounds, outlining its physical extent. Unity's Collider.bounds Documentation

    contactOffset

    number
    ClientOnly

    Adjusts collision detection sensitivity, controlling the threshold for collision recognition. Unity's Collider.contactOffset Documentation

    enabled

    boolean
    ClientOnly

    Toggles the Collider's interaction capabilities; disabling prevents collision detection. Unity's Collider.enabled Documentation

    Specifies layers to exclude from collision detection, enhancing control over interaction scope. Unity's Collider.excludeLayers Documentation

    hasModifiableContacts

    boolean
    ClientOnly

    Indicates the capability to modify collision contacts, useful for custom collision handling. Unity's Collider.hasModifiableContacts Documentation

    Defines layers to include in collision detection, allowing targeted interaction setups. Unity's Collider.includeLayers Documentation

    isTrigger

    boolean
    ClientOnly

    Converts the Collider into a Trigger, which notifies of entering or exiting objects without physical collisions. Unity's Collider.isTrigger Documentation

    layerOverridePriority

    number
    ClientOnly

    Determines override precedence in Layer Collision Matrix conflicts, guiding collision layer resolution. Unity's Collider.layerOverridePriority Documentation

    providesContacts

    boolean
    ClientOnly

    Identifies if the Collider supplies collision contact data, facilitating detailed interaction analysis. Unity's Collider.providesContacts Documentation

    Methods

    ClosestPoint

    ClientOnly

    Determines the nearest point on the Collider to a specified location, useful for proximity-based interactions. Unity's Collider.ClosestPoint Documentation

    Parameters

    position

    Target position for closest point calculation.

    Returns

    The nearest point on the Collider.

    Identifies the nearest point on the Collider's bounds to a given location, focusing solely on outer limits. Unity's Collider.ClosestPointOnBounds Documentation

    Parameters

    position

    Target position relative to the Collider's bounds.

    Returns

    The closest boundary point.

    Parameters

    ray
    maxDistance
    number

    Returns

    boolean

    Updated 12 days ago

    PocketWorlds Icon

    © 2025 Pocket Worlds. All rights reserved.