Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

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:
    445
    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.