Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Trouble getting a compound shape to work

Discussion in 'Physics for ECS' started by PythagoRascal, Oct 20, 2022.

  1. PythagoRascal


    Oct 25, 2012
    Hi, I am trying out the Unity Physics package for the first time to evaluate it and I'm having trouble getting a compound shape to work.

    Unity 2021.3.11f1

    I'm currently following the manual for compound shapes in the package docs, but when I set up a compound shape it does not collide with my "ground" object. My set-up is:
    • Ground_Obj (Physics Shape, plane; ConvertToEntity, inject)
    • Simple_Obj (Physics Shape, sphere; Physics Body, dynamic, ConvertToEntity, inject, CopyTransformToGameobject)
      • Simple_Mesh (Mesh Filter, Mesh Renderer)
    • Compound_Obj (Physics Body, dynamic; ConvertToEntity, inject, CopyTransformToGameobject)
      • Sphere_Collider (Physics Shape, sphere)
        • Sphere_Mesh (Mesh Filter, Mesh Renderer)
      • Cylinder_Collider (Physics Shape, cylinder)
        • Cylinder_Mesh (Mesh Filter, Mesh Renderer)
    When I enter play-mode, the collision between Ground_Obj and Simple_Obj works as expected, however the collision between Ground_Obj and Compound_Obj does not work and the Compound_Obj falls right through Ground_Obj.

    Does anyone have an explanation for what I'm doing wrong here? When I look at the docs this should work.