I currently have 2 mesh objects - the Anchor and the Rod. The Anchor rotates around the z-axis, as shown in the image. The Rod is designed to only move backward and forwards. You can view the image here: .
However, I am struggling to determine the matrix calculation. For instance, if the anchor rotates 45 degrees to face the x-axis, how can I ensure that the rod continues to move backward and forwards?