Child not following parents transforms.

I have a sword attached to a model. I have added an empty game object to the sword so I could add a collider to it. The empty game object is not following the sword, and I can’t figure out why. There are no scripts effecting the empty game object at all. There is a rigid body and a capsule collier at the top of the characters hierarchy.

2631464--184974--upload_2016-5-11_22-47-2.png
Figure 1 - The hierarchy of the character. Rigidbody is on the Knight object, SwordCollider is the empty game object with the collider on it.

2631464--184973--upload_2016-5-11_22-46-24.png
Figure 2 - Character in the scene view. Collider is right on top of sword here.

2631464--184972--upload_2016-5-11_22-45-52.png
Figure 3 - Character during game play, notice the capsule collider follows the rotation of the entire knight, but not the sword like I want.

Can someone please explain to me why not? I have been struggling with the relationship between the parent/child hierarchy and how the children are effected. It doesn’t seem to work intuitively. Many thanks.

Thats pretty weird, are you transforming thr sword using world or local space?

1 Like

How can I tell for sure? I believe it is local space. When I move the entire character around the values for rotation and position in the swords transform do not change.

I was able to solve this problem by parenting the sword collider object to the players hand bone and not the sword object.

1 Like

It was probably due to non uniform scale somewhere in the parent(s).