docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Icon Create Collider

    Toolbox Rule Engine
    Generate Collider components.

    Parameters

    Parameter Type Description
    oneColliderPerObject Boolean
    strategy ProxyStrategy
    maxDecompositionPerMesh (Max decomp. per object) Int32 Maximum number of decompositon to generate, per mesh.

    On a fork for instance: you would put 5: 4 for the spikes + 1 for the base.
    maxTrianglesPerMesh (Max triangles. per mesh) Int32 Maximum number of triangles per output convex collider mesh
    resolution Range Concavity resolution (the higher the more concave).
    gridResolutionPreset (Mesh quality preset) GridResolutionPreset Voxelization quality presets.
    gridResolution (Quality value) Int32 Specify the voxel grid resolution. A setting of 'x' divides the model into roughly x³ voxels. Increasing this value may result in longer processing times and more triangles in the output mesh.
    boundingBoxType (BoundingBox) BoundingBoxType

    Additional Information

    This function creates a compound collider on an existing or new mesh. Four strategies are available:

    Retopology

    Use this strategy to create a mesh approximation with a low polygon count for the assigned collider. Read more about retopologizing.

    Convex decomposition

    Use this strategy to generate a set of convex mesh colliders from the source geometry. This strategy is ideal for advanced physics collision. Colliders are assigned to existing GameObjects.

    Image

    Specify these parameters:

    Parameter Description
    Max decomposition per mesh The maximum number of convex hulls to generate per mesh.
    For the gray Gameobject in the illustrated example, the best value is 4 – for the 3 tubes and the base.
    Max triangles per mesh The maximum number of triangles per output collider mesh.
    Resolution The precision of the mesh collider.
    High resolutions drastically increase processing time.

    Axis-aligned bounding-box

    Use this strategy to create a set of box colliders for each mesh. Colliders are assigned to existing GameObjects.

    Image

    Initial mesh

    Use this strategy to use the existing mesh as a collider.

    Additional resources

    • Collision (Unity documentation)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)