Double-check your rotation keyframes. I don't think they're all set in the same direction. It sounds as if you added degrees & rotations when you should have subtracted & vice-versa.
All values for rotation, both rotations and degrees, are positive numbers. If that's what you mean.
Try changing the Keyframes' interpolation to linear just to check it out. If you highlight them all, then right-click on one, you can do them all at once.
I think it's always going in the right direction. I think you babe got a math problem. In one second you have for revolutions. 360 X 4 / the frame rate could easily give you numbers that make the rotation look like it's going backwards in exactly the same way that stagecoach wheels sometimes look like they are rolling backwards sometimes.It's called stroboscopic effects. For example let's say your frame rate was 24 frames per second and you rotate the layer 12 times in one second. The first frame would be 0° the second 180° the third 360° and so on. If this was a square it would not look like it was rotating at all. Change the frame rate to 30 fos or change the time and you'll be able to see the rotation.
You can check this out by simply observing the rotation values in the timeline. Easing in and out of the keyframes is not going to help the problem either.
Turning on motion blur or maybe even adding raial blur may help but you are probably going to have to change the number of rotations for the time to make things look like they are rotating correctly.
When I slow down the replay, the rotation clearly reverses each time it hits a keyframe. It's not a stagecoach optical illusion.
If I set a keyframe on the first frame with 0 rotations, 0 degrees, then a key frame on the last frame at 2 rotations and 0 degrees the object correctly rotates twice over the course of the animation. However, if I add a keyframe anywhere within the timeline, say half way through, the rotation will then change. The object will rotate clockwise until it hits the middle keyframe, then it will reverse and rotate counterclockwise the rest of the animation.
What values should I be looking at to prevent that from happening?
Slowing down the playback won't show change the relationship between rotation and frames. Check your graph editor. I'll bet it shows a constant increase in rotation value.
To see the stroboscopic effect in action add a 400 X 400 pixel solid to a 30 fps comp and set a keyframe at 0 of 0 0º. Now move the CTI to 30 frames and set a keyframe for 4 0º (four rotations). Now step through the comp one frame at a time. Frame 2 = 48ª, frame 3 = 96º and so on. The sure looks like it is rotating clockwise.
Now set the CTI to frame 25 and move the last keyframe to that spot. Frame 1 = 0º, Frame 2 = 60º, Frame 3 = 120º and so on so the rotation value is increasing. But because the shape is a square the top line of the square goes from horizontal (180º) to down hill on the left by 20º so the motion appears to move backwards. If you fill the square with a gradient the apparent direction will reverse. Change the frame rate and you can also change the perceived direction of rotation to matter what the playback frame rate.
No matter what I do I can't get them to reverse unless I apply some funky easing values. Check out this value graph:
The odd thing about this example is that for the steep part of the value curve when you step through one frame at a time the square appears to be rotating counter clockwise. If I move the third keyframe to the right just 4 frames the rotation all appears to be clockwise except for the part just to the right of the third keyframe where the rotation is actually counter clockwise.