docs.unity3d.com
    Show / Hide Table of Contents

    Enum TerrainCollider.CollisionMethod

    TerrainCollider offers two methods for rigid body collision with performance / quality tradeoffs.

    Namespace: Unity.Physics
    Syntax
    public enum CollisionMethod

    Fields

    Name Description Value
    VertexSamples

    Each vertex of the other shape is projected downward onto the terrain and a contact plane is generated from the triangle. This is very fast, but it is possible for the other shape's edges and faces to penetrate edges and vertices of the terrain, or for the other shape to tunnel completely through steep faces in the terrain. It works best with relatively smooth terrain, and worst with cliffs and sharp peaks. It also has the trait that bodies below the terrain but within its AABB will be pushed up, even if they are not touching the surface triangles.


    0
    Triangles

    In this mode the collision behaves exactly as if it were a MeshCollider.


    1
    In This Article
    • Fields
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023