You can create and define motion elements in a mechanism to determine how the components are to move with respect to each other.
About Mechanisms About 3D Contacts