Problem adding 2 parent constraints (2nd constraint overrides 1st one)

Problem adding 2 parent constraints (2nd constraint overrides 1st one)

Anonymous
Not applicable
2,707 Views
7 Replies
Message 1 of 8

Problem adding 2 parent constraints (2nd constraint overrides 1st one)

Anonymous
Not applicable

I'm trying to recreate a robot scene shown in one of Sir Wade's YT videos on constraints: https://youtu.be/U8JXO39aAqY  I've 2 robots and 1 box. I selected the box and created "BoxGroup". I created a locator named "BoxLocationA" that is parented to Robot1. I selected BoxLocationA, CTRL-click BoxGroup and created a parent constraint. At that point everything with Robot1 works as it should. I moved Robot1 and attached box to where I need them to be handed off to Robot2 and set a key on frame 45. On frame 46, I turned off the parent constraint and disabled the rest position. I moved Robot2 into place to grab the box then set a key. I created another locator, named it BoxLocationB, parented it to Robot2, selected BoxLocationB, CTRL selected BoxGroup and created a parent constraint. For some reason, it seems to be overriding/replacing the first one. (I've tried creating the second constraint with the "override" box checked and unchecked. Doesn't change the outcome.) The box gets handed off to Robot2 but I can't get it to go back to Robot1 when playing through the animation. When I go back to frame 1 it remains with Robot2. What am I doing wrong or not doing? I've successfully completed the ball and board exercise shown in SW's video twice now without this issue. I recorded a playblast before I added the second constraint and another playblast after but I don't see a way to add .avi files on here and I don't have cloud storage to upload to. Below is a screen grab of the Outliner before I added the second constraint just to show the hiearchy.

 

MayaRobots.jpg

 

 

0 Likes
Accepted solutions (1)
2,708 Views
7 Replies
Replies (7)
Message 2 of 8

osidedan
Advocate
Advocate

you're definitely on the right track, I'm thinkin there might be just one part missing somewhere. If you want, zip your file and post it here and I can take a look! (you have to zip the maya files to be able to post them on the forums)

0 Likes
Message 3 of 8

Anonymous
Not applicable
Thanks for the reply. Do I just.zip the .mb scene file? Nothing else?
0 Likes
Message 4 of 8

osidedan
Advocate
Advocate

Yep! Just zip the maya file. No need for textures or anything external.

0 Likes
Message 5 of 8

Anonymous
Not applicable

Here is the .zip file.

0 Likes
Message 6 of 8

osidedan
Advocate
Advocate
Accepted solution

Thanks! I took a look, and as far as I can tell from the file provided, you may have just been missing setting keys on the parent constraint itself. 

I'm also attaching a working version so you can take a look.

 

Here's what I did to fix it:
It was missing a second object as a parent, so I added a locator for that (BoxLocationB). then I added a parent constraint from that locator to the box group. Of note, if an object already has a parent constraint, it just adds the new parent to the current constraint. Once that relationship was set, I just keyframed the parent constraint to switch from BoxLocationA to BoxLocationB on frames 74 and 75. To see this, select the parent constraint, and look at the channel box and watch Box Location AW0 and Box Location BW1. They represent the weight of the influence of those objects on the box group.

 

Frame 74:

frame_74.png

 

Frame 75:

frame_75.png

 

I hope that makes sense, let me know if you need more info!

 

0 Likes
Message 7 of 8

Anonymous
Not applicable

I cannot thank you enough for providing me with not just photos and a fixed version for me to look at but a thorough explanation of what I wasn't doing and needed to do. Sir Wade wasn't passing something from one object to another in his YT video so I guess there was no need for him to go into details on how to do this. In his YT video he was merely instructing on how to get the ball to get tossed into the air and land back on the board. Again, many, many thanks.

Message 8 of 8

osidedan
Advocate
Advocate

You're welcome! Glad I could help. Constraint switching in maya can be tricky, but once you get it working correctly a few times it starts to make sense.

 

Of note, if you need to pass the box back to the original robot,  easiest way to do that is just add a new locator, and have it act as the third destination for the box. No need to get hung up trying to get the box to match back to the original locator. My workflow is like this: any time an object "changes hands" (for lack of a better term), just add a new locator, add it to the parent constraint, and key accordingly. Hope that makes sense, and I'm glad you got it figured out!

0 Likes