Answer
No, it doesn't matter if you travel in a straight line.
Work Step by Step
The time dilation equations we used in problem 3a had no variables that depended on the direction. As long as there is a relative speed between the two reference frames, the resulting time dilation will be the same regardless of the path taken.