Hi there!
I am trying to make some physics additions to my project and encountered some weird behavior of RigidBody:
I am making first GameObject, this one has RigidBody(without gravity, with some mass).
Then i am adding some GameObjects as childs. Everything ok there.
Then i am adding colliders to those GameObjects(its cubes so cube collider).
And there is strange thing - the more i add colliders(to those childs) - the more parent GameObject moves from it original position. By little, but moves.
Childs added with .SetParent (transform,false); and set position with localPosition.
What am i doing wrong?
As far as I know, it is the collider which defines the center of mass of an object with rigidbody. So when you change the collision shape of an object by adding new colliders, you also change the center of mass of that object. Try adding the rigidbody after you are done with children and their colliders.