Rigging
Hinge rig
Download scene: hinge_rig.ma
- Create left and right flaps, center hinge
- Parent left and right flaps to center hinge
- Move pivot for left and right flaps to sit near (or on) the hinge
- Create locators, put them far left and far right of the flaps
- Select left locator, left flap, aim constraint, aim axis is -1 0 0, limit to Y axis only
- Select right locator, right flap, aim constraint, aim axis is 1 0 0, limit to y axis only
- Move the parent hinge, the flaps should try and keep aiming at their respective locators.
Hinge on rails
Download scene: hinge_rail_rig.ma
Added a set driven key that drives the locator x position by the hinge z position.