Jim, I think the direction is accounted for. If you look again you'll see that the first subtraction can end up either positive or negative, depending on the direction of lateral movement. As long as the sign there correlates to the sign of the direction stored in his waves (or the sign used when firing virtual bullets), then it should work. That is what I'd look at first. I would calculate the bot's current direction using: (getAccumulatedLateralVelocityAt?(currentTime) - getAccumulatedLateralVelocityAt?(currentTime - 1)) < 0 ? -1 : 1 So that it can only be the same sign. My other speculation is that (currentTime - fireTime) is not necessarily equal to (targetDistance / BULLET_VELOCITY), and that may be a source of inaccuracy. You should probably use (8 * (currentTime - fireTime)) instead. (This is assuming I know what fireTime is. ;) -- nano |