Point to point hinge constraints... Different Axis?

Hey, I’m just confused on how to use hinge constraints on a different axis. Right now, I’m trying to do a truck and trailer thing, but I’m stumped on how to make the trailer only pivot on the Z axis right at the tip. Thank you!