Positioning problem when using hierarchy

Hi,
I was just facing a problem while trying to create a custom ragdoll for a model by creating colliders per hand.

I created a simple example for my question where the same problem occurs. I created two empty GameObjects and made the second a child of the first. My first Object has the position (6,3,6), while the other has the local position (4,1,0), so translated a bit. Now I tried added a Capsule Collider to the parent GameObject (the first one) using the Component->Physics->Capsule Collider function. I expected to get a collider which is centered on my GameObject, but the Collider is set to an position with seems to be related to the child-object I created. I created a picture so you may understand it better:

alt text

If it delete the child-GameObject, the Capsule is automatically moved into the correct center point. Its “center”-value is (0, 0, 0) during the hole process.

So can someone explain to me, why the capsule seems to get the negative translation of the child-object attached to this object?

Thanks in advance,
Mark

This is a curious issue. In fact I just went and tested this since it made no sense, and the capsule collider is actually installed exactly at the parent’s position, when the center is 0 0 0.

So we’re looking at a very different issue here. There’s scripts or something else going on there, manipulating the collider, isn’t it?

Suggestion: create a new project. create a new scene. create the two empty gameobjects. translate the second empty, and parent it to the first gameobject. add the capsule to the first gameobject. no matter what you do, its center will be unrelated to the child.