There is a two step process needed to make this work. For this solution I will be using a bird's nest as the object that must be constrained to a tree branch.
Part 1
- The tree is one complete mesh. Select a few faces along a length of the branch that the nest will be sitting on.
- Now extract the selected faces “mesh>extract” This will create a new mesh while maintaining the trees animation history. History is very important!
- Now select the nest and place it in its spot.
- Select the newly extracted mesh and shift select the nest and now apply a normals constraint with [Animation] Constrain->Normal
- If you playback the animation you will see the nest rotate but not follow.
Part 2
This will involve an expression that tells the nest to follow a vertex on the branch.
- In component mode select a vert that the nest will follow. Make note of the vert number in the channel box. (e.g. 4936)
- Now select the nest and apply an expression by right clicking on one of the translation attributes in the channel box.
- Now apply this expression in the bottom field. You will need to change the “birchSpringHeavy1Main” to whatever mesh you want the
nest to follow and change the vtx number to match your vertex number. Finally change to “pCube1” to match your nest name.
float $arrayOfFloats[]=`pointPosition birchSpringHeavy1Main.vtx[2231]`;
pCube1.translateX = $arrayOfFloats[0];
pCube1.translateY = $arrayOfFloats[1];
pCube1.translateZ = $arrayOfFloats[2];
Create expression and everything should now be working!
Thanks to Nelson Cruz for providing this tip
Comments
You can follow this conversation by subscribing to the comment feed for this post.