my cow object sinking through ground?
I made a cow object out of many capsules. First I created an empty game object and named it cow. then I added 7 capsule objects into the empty game object as children. these are the body parts, like head, leg, body. I put an AI script on the empty game object that was named cow. I also put a rigidbody on cow, the empty game object. I put capsule colliders on all the 7 capsule body parts, but not the empty game object named cow. p.s. I also put a navmeshagent on the cow empty game object. Also baked the ground navigation so the AI script allows the cow to wander around.
but somehow the model game object sinks its 4 legs below the ground whenever I press play. It's only the legs that sink, even though they have capsule colliders. the body hangs above the ground for some reason. but the body has the same capsule collider. This doesn't make any sense, because I did this whole process(even navmeshagent) before on another computer, and it worked that time. Any help to keep the whole cow afloat?
model looks like this:
Cow //empty game object with navmeshagent, rigidbody, and AI script -body //capsule 3d object -leg1 //capsule 3d object -leg2 //capsule 3d object -leg3 //capsule 3d object -leg4 //capsule 3d object -neck //capsule 3d object -head //capsule 3d object
don't read the "model looks like this:" part, because the draft looked different than the posted version.
Are the feet hovering just above the surface of the ground? If the collider clips with the ground plane it will sometimes fall through.
ok so when I place the cow above the ground, and press play, it seems to fall and land on the ground, perfectly without any legs sinking through. but the thing is, the navmeshagent wont work. so the cow is just frozen and lifeless.
when I place the cow just a little above the ground, then press play, its legs sink through.
So the problem is the navmesh agent doesn't have a collider component to work with. You can fix that a few ways, either make the capsules into one mesh in a modeling package and then tick the mesh collider or just remove all the other colliders and create a new box collider that encompasses the rough area of the cow. Just be sure the collider is on the same GameObject as the Nav$$anonymous$$esh Agent.
ok cool how do I make all the capsules into one mesh modeling package?
Your answer
![](https://koobas.hobune.stream/wayback/20220612113650im_/https://answers.unity.com/themes/thub/images/avi.jpg)