I saw this answer on how to use SKAction to follow Circle CGPathRef in clockwise direction.
What about rectangular path? The default one will be in counter-clockwise fashion:
CGPathRef square = CGPathCreateWithRect(CGRectMake(pathOriginX,pathOriginY,pathWidthX,pathHeightY), NULL);
SKAction *followTrack = [SKAction followPath:square asOffset:NO orientToPath:YES duration:completeOnePathDuration];
Tried changing the end points but the result is the same.
Short Answer: run the action in reverse to follow the path in the opposite direction
Long Answer: the followPath SKAction follows the direction in which the path was built. If you want your sprite to move along a rectangle path in a clockwise or counter-clockwise direction, then build the path accordingly. Alternatively, you can use the reverseAction method to follow a path in the opposite direction than it was built. Here are examples of both methods.
Build a rectangular-shaped path in clockwise order in scene coordinates (CCW in view coordinates)
Use built-in method to construct a rectangular-shaped path in counter-clockwise order in scene coordinates (and CW in view coordinates).