[Pogamut-list] Can't go backwards?

schrum2 pogamut-forum at artemis.ms.mff.cuni.cz
Wed Oct 15 00:56:46 CEST 2008


Re: Re: Re: Can't go backwards?
Thank you for all of the help. I think I've almost got the method worked out. Oddly, it seems to work at sometimes and not at others. It's a bit confusing because some methods accept degrees, some take radians, and some take UT degrees. It's hard to keep track sometimes. Can someone tell me what's wrong with this?

    public boolean action_moveBackwards()
    {
        this.log.info("Action MOVE BACKWARDS.");
        Triple location = this.bot.getMemory().getAgentLocation();
//point right in front of bot        
Triple target = Triple.add(location, Triple.rotateYawPitchRoll(new Triple(50,0,0), bot.getMemory().getAgentRotation().x, 0, 0));
//point right behind bot        
Triple strafeLoc = Triple.rotateYawPitchRoll(Triple.subtract(target, location), Math.PI, 0, 0);
        strafeLoc.normalize();    
        
        this.bot.getBody().strafeToLocation(strafeLoc, target);
            
        return true;
    }

----

Reply Link: <https://artemis.ms.mff.cuni.cz/pogamut/tiki-view_forum_thread.php?forumId=5&comments_reply_threadId=293&comments_parentId=253&post_reply=1#form>





More information about the Pogamut-list mailing list