You can use a universal joint to connect two bodies, such as rotating shafts, which can be either aligned or inclined.