Keeping Dynamic objects in place
Q: How can I keep Dynamic objects fixed in place?
A: Guess what? It's our old friend Constraints again.
- Parent your object under a Group and then translate your object (not the group) slightly in Y. This offsets the pivot MASH will use.
- With the group you just created selected, create a MASH network.
- Set Distribution Type to Radial.
- Add Dynamics node.
- Slightly increase the Mass to 2.
- Under the Constraints rolldown, right click in the window and Create a Constraint.
- Double click the Constraint to open its Attribute Editor template.
- Set Constraint Type to Spring and Connection Mode to Connect to Offset Point.
- Under the Spring > Rotational Spring rolldown, check Enable Z, set Stiffness to 100 and Damping to 0.007. (you can of course play with these settings)
- Now create the 'Flapper' object and repeat step 1 to move its pivot point.
- With the group you just created selected, create a MASH network.
- On the Distribute node set Number of Points to 1.
- Add a Dynamics node and set Mass to 25.
- Add a Constraint (as per point 6)
- Set Constraint Type to Custom and Connection Mode to Connect to Offset Point.
- Under the Motor > Rotational Motor dropdown check Enable.
- Set Target Speed to 200 and Maximum Force to 400 (Z for both)
- Under the Limits > Rotational Limits dropdown, set Limit Type X and Y to Fixed (leaving Z to Free).
- Press Play.
Tip: We're suggesting offsetting pivots using a grouping method here. You can instead move pivots and 'bake pivot' instead. The nice thing about the grouping method is that MASH will update live if you move your object within the group it's parented under.
Download an example file here (requires Maya 2018)