Could any body explain the consequence of below situation?
or had an experience like this?
Here is the situation.
I’ve added articulation body component through script.
First articulation body was added in child B.
And second articulation body was added in parent A.
Then, I tried to move a Object A with ArticulationBody.TeleportRoot() method.
The problem is that the object A was never translated where I’ve desired!
BUT, when I disable the articulation body(uncheck the compoent) on Child B and re-enable the component(check it again), it’s working correctly what I want.
I think this is due to how articulation bodies get created. If you create one manually in the inspector you will see that if the there is no articulation body previously in the hierarchy then the newly created body will be a root body, with no parent. Adding a parent in the inspector updates the first body to make it a child of the second (parent) body. I assume this last phase is coded into the editor or more likely some return values from PhysX and is not happening for you until you disable/enable the child.
I can see how this can be considered a bug - especially as I don’t think there is a way to allocate a parent via script.
The fix is to create your articulation bodies from the top down, it then works as expected.