• Studio

  • Studio API

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Collider

    Inherits from: Component

    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.

    Properties

    enabled

    boolean

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

    Points to the Rigidbody component associated with the Collider, crucial for physics interactions.

    isTrigger

    boolean

    Converts the Collider into a Trigger, which notifies of entering or exiting objects without physical collisions.

    Adjusts collision detection sensitivity, controlling the threshold for collision recognition.

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

    Indicates the capability to modify collision contacts, useful for custom collision handling.

    Identifies if the Collider supplies collision contact data, facilitating detailed interaction analysis.

    Determines override precedence in Layer Collision Matrix conflicts, guiding collision layer resolution.

    Specifies layers to exclude from collision detection, enhancing control over interaction scope.

    Defines layers to include in collision detection, allowing targeted interaction setups.

    Methods

    Determines the nearest point on the Collider to a specified location, useful for proximity-based interactions.

    Parameters

    position
    Vector3

    Target position for closest point calculation.

    Returns

    Vector3

    The nearest point on the Collider.

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

    Parameters

    position
    Vector3

    Target position relative to the Collider's bounds.

    Returns

    Vector3

    The closest boundary point.

    Updated 2 months ago

    PocketWorlds Icon

    © 2024 Pocket Worlds. All rights reserved.