Search Unity

Question Help with SOME units falling through the collider/floor

Discussion in 'Physics' started by kidi0892, Mar 17, 2023.

  1. kidi0892

    kidi0892

    Joined:
    Mar 11, 2020
    Posts:
    4
    Hello!

    I have problem with objects falling through my floor.
    Watch it here:


    So I spawn some objects and some objects go through the collider.
    I have read this article and I am aware that there are issues of this type:
    https://docs.unity3d.com/Manual/ContinuousCollisionDetection.html

    But. I thought that these issues apply to thin colliders. If I use convex or thick primitives colliders things work okay. I tried all possible combinations with rigidbody settings - collision detections, interpolation etc.

    But. I want to have complex terrain with hills and slopes. All terrain engines generate flat plane which they then morph. I thought if I used third party 3D app like blender and make my mesh thick that problem would be solved. Didn't work.

    I haven't been able to google out any solutions about this problem which I thought to be pretty common OR something is very wrong with my setup.

    So, could you point out where I missed something or is there some other approach to collision detection?

    My game is some sort of RTS with many agents.
     
  2. lightbug14

    lightbug14

    Joined:
    Feb 3, 2018
    Posts:
    447
    Continous collision detection should work fine.

    The collider in the video is actually infinitely thin like a plane/triangle. Basically, a concave shape is composed of multiple triangles. I believe the physics engine does primitive-v-triangle detection at some point.