Search Unity

Mesh Collider Faulters at positions xyz

Discussion in 'World Building' started by renman3000, Sep 1, 2019.

  1. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi there,
    I made a shape in ProBuilder, and the resulting Mesh Collider is inaccurate at this juncture in picture. Meaning a RayCast.Down which my player sends correctly for most of the track returns null at the point. I am wondering what might be happening and how I can fix this.

    Thanks!
     
  2. crysicle

    crysicle

    Joined:
    Oct 24, 2018
    Posts:
    95
    Is this mesh marked convex on the MeshCollider componant? If so, the MeshCollider will approximate the mesh data by reducing the collider's complexity, which reduces the total vertice count on the collider and gives it volume. With this reduction, especially for complex shapes like this one, it can change the collider's shape entirely.
     
  3. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697

    Hi,
    Convex = false, on the component.