How to "child of constrain" this animation?

Hi to everybody. I need to animate a robot arm that hold one object while moving (not a problem with a “child of constrain”). The problem arises when the object held by the robot arm has to be passed to another robot arm. Simplifying a lot I created an image where the yellow cylinder “holds” the red cube as it rotates. Arrived near the blue cylinder it must be the latter that “holds” the red cube. I hope I’ve made my point. I tried to use two “child of constrain” but I get combined shifts of the cube due to the two influences and I’m going crazy. Any suggestion?
Thanks in advance.

Hi, what you could do instead is have the same object in the hand of both characters and keyframe animate the visibility on and off at the time of passing the object.

I know, it was an option… but in the final animation I had to exchange several object (it’s a CNC tool changer magazine) so I’m trying to figure out how to do things in the right way without shortcuts.

You could animate the influence of the constraint:

I know I can animate the influence. The problem is that when you’re using more than one constrain the object flies away when you switch influences. “Set Inverse” works at the beginnig to relocate the initial position… but then it starts messing up when you switch influences in the animation.

Ok… I think I solved the problem. I try to explain here so it can be useful for someone else.

Let’s suppose we are animating the scene in the picture i uploaded before. At frame 1 yellow is holding red and start rotating. At frame 100 yellow finish rotating and leave the object so green pick up the object and start rotating up to frame 200.

  1. Frame 1
  • Add a “child of constrain” to the red cube, target “yellow”, influence 1, press SET INVERSE to keep the red cube at it initial position.
  • Add another “child of constrain” to the red cube, target “green”, influence 0, press SET INVERSE to keep the red cube at it initial position.
  1. Frame 100
  • Rotate YELLOW and red will follow.
  • Select red cube and clear transform (CTRA-A) and keyframe the position. (this reset the new local initial position of the cube)
  1. Frame 101
  • Select red cube and set the influence of “child of constrain” with the “green” target to 1
  1. Frame 200 rotate the green and the cube will follow.

So it seems that added constrain works “over” the previous and you need to leave the previous at 1 to avoid objects return to their previous position.

Now I’ll try with several objects and arms just to fully understand and control the animation.

Just chiming in: I think this would help…

Oh, well, glad you figured it out.

I “used” that suggestion but it works with one constrain. If you use more the key is not to put the first influence to 0. Just “add” the influence of the second constrain leaving the first untouched. A bit weird but it’s how it works.