How to Rotate a Tire Manually Without Flipping

Here are some example images of what I’m currently doing. This one is how I’m currently rotating the tire when I accelerate or reverse. Forward Speed is calculated earlier and then this is repeated for all 4 tires. It works without issue, though of course when the tire flips it’s turning in the wrong direction. Though I don’t believe this code has to change much at all for this issue.