This pic might help you as you lay out your drive train;
While played out is a single plane, above, this alignment technique must be used in both the vertical and horizontal planes.
You do not want the drive train to be in a straight line. The universal joints or the CV joint (if you go that route) will fail. Both require a small misalignment but parallel input and output shafts in both the horizontal and vertical planes.
The easiest way to explain this is the tail shaft centerline and the pinion gear centerline need to be parallel to one another but not in a straight line.
Hope this helps.
Ed