[Pogamut-list] Turning and moving at the same time?

michal.bida pogamut-forum at artemis.ms.mff.cuni.cz
Mon Jan 26 13:51:33 CET 2009


Re: Re: Re: Turning and moving at the same time?

Author: michal.bida

> > I have revisited the code of the GameBots and implemented version where move and turn commands don't interrupt themselves. The GB version is compatible with Pogamut 1.21 and can be donwloaded from download section or here: [http://artemis.ms.mff.cuni.cz/pogamut_files/GameBots-090122.zip|Gamebots 2004, newest] . 
> > 
> > Comment: 
> > Move and turn commands now does not interrupt themselves. (RUNTO, MOVE, TURNTO and ROTATE). When turn command sent during move command, the bot will change his rotation, but won't stop moving. Move commands now won't change bot actual rotation (only after approaching target location, the bot will turn to the direction of the movement - not if turn command was issued during the movement.)
> 
> That's great! I tried it, but noticed I used the CMOVE command (or contMove()) because I only want to move forward. Is it possible to fix it easily for this command as well?
> 
> Thanks in advance,
> 
> Niels

Well what CMOVE command does is simply the bot will start moving to the direction he is facing. So when you send TURNTO command during this movement the bot will continue to move and will steer according to TURNTO command. I like this behavior, becauese it features nice steering movement. If you want your bot to move to some specific location + facing another spot, use RUNTO command or STRAFE command.

best,
michal





More information about the Pogamut-list mailing list