This image illustrates the application of joint rotational limits in a bone chain and across chains. In this case, a single hand connector is linked to a three-bone chain. The second bone in the chain is selected and two pie-shaped wedges illustrate the rotational limits (relative to the parent orientation) for that bone (yes, that’s where the AS 3 Wedge class comes into play). The bone is rotated towards its lower limit and is not allowed to exceed that limit as shown in the leftmost image.
Next, the third bone in the chain is selected and rotated towards, but not past its upper limit. Notice that in all cases, the motion is propagated to the next chain in the hierarchy (the hand connector). Finally, the hand connector is selected. Bones in a chain know their parents, so it’s easy to query the parent orientation. Anything connected to a chain (another chain or connector, for example) must implement the IChain interface. This interface ensures that it is always possible for the current item to query who it is linked to and obtain the parent’s orientation.
As can be seen from the diagram, it is not possible to rotate the hand connector beyond its outer limit. The implementation is general-purpose and multi-chain, so joint limits can be applied to Biped, Quadruped, and custom rigs with the same code base.