ArticulationBody Hierarchy Resets When Adding a Child Body at Runtime

Hello,

Every time I add a new articulation body dynamically as a child to an existing articulation body hierarchy, all bodies in the hierarchy get reset to their initial orientation. E.g. if a closed door is opened during gameplay then I add a new articulation body child to that door during runtime, the door will suddenly close as well as any other body in the hierarchy, they all reset to their initial orientations.

Is this an expected behavior? and is there any workaround?

Thanks!

Sounds like a bug. I’d recommend you to file a bug report with a simple repro case.

1 Like

Thanks @Edy ! I’ll do that.

Also, can someone from Unity let us know if is there a workaround?

You can save the state of the whole tree by traversing all ArticulationBodies and storing jointPositions and jointVelocities. You can write them back after you added the child.

but I also think this should be considered a bug.

2 Likes

@tjmaul Thank you! storing/applying joint positions and velocities works like a charm!

1 Like