Inverse Kinematics can be used but using constraints would be more simple and eficant on stuff like this.