I’m working on an animation for a chain anchor coming out of a hole. The chain links are children of the previous link and they are connected to my object I’m anchoring. The links use a rigid body and a box collider and character joint to connect to each other. At the game start they are in a straight line contained inside the object. I slide them out using an animation attached to my first chain.
When the chain reaches the correct position I have an event in the animation that calls a script that attaches my last character joint that links it to the game object I’m anchoring. I then turn on all the box colliders.
The problem I’m having is I have an animation that then retracts the chains back in. My animation pulls my top tier link back into the object and it drags my other links in as well but they retain their position and just sort of slide on the ground like they are frozen.
I have tried to do a transform in the animation that resets the position of the chains into a straight line when they are back inside the the game object but they don’t move back into a straight horizontal line, they stay vertical.
when I play the animation again to extend the chains they just slide out again vertically like they fell after the first animation once physics took control of them.
what I want to have happen eventually is the chains retract back into the hole and then be able to reset the position of the chains again back into a straight line so they deploy back out of the hole.
I’m not sure this can be achieved in the animation but due to the tight timing needed to snap on the character joint
I’m confident my problem is the child relationship on the other links as my main link moves around as intended but the children links just won’t move as intended no matter how I change their position.
Sorry if this is confusing Let me know if you need clarity. Thanks in advance