[Pogamut-list] Turning back to old location/rotation.

jacob.schrum pogamut-forum at diana.ms.mff.cuni.cz
Thu Aug 12 15:10:05 CEST 2010


Re: Turning back to old location/rotation.

Author: jacob.schrum

Usually the bot has to focus on an opponent to fire on it.  If you tell the bot to move from x to y, and along the way you tell it to focus on and shoot at an opponent, it will turn. If after the opponent is gone, you reissue a "move to y" command with the focus explicitly set to null, it should resume looking where it is going. The same can be done if you're using the pathExecutor, whose focus target and location can both be set to null.

-Jacob

> Hi all,
> 
> Does anyone know how to after issuing Shoot command revert the bot back to the old orientation. Let say the bot runs in a straight line and the enemy is on his left, what it does then is to shoot left at the enemy and continue with his previous direction. My current approach is to save the old location & rotation just before shoot is done and then issue turnTo but the effect is completely not what I want. The bot simply goes back to strange direction spinning in circles or going in zigzag way.
> 
> Cheers,
> 
> P.

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=341&post_reply=1#form>





More information about the Pogamut-list mailing list