[Home]History of Muffin/Questions

Robo Home | Changes | Preferences | AllPages


Revision 6 . . (edit) February 16, 2004 16:43 EST by Nano
Revision 4 . . February 16, 2004 14:57 EST by Sparafucil3
  

Difference (from prior major revision) (minor diff)

Added: 9a10,13

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

Robo Home | Changes | Preferences | AllPages
Search: