Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 12, 2015, 11:31:46 AM (8 years ago)
Author:
gania
Message:

low on battery 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/AI_HS15/src/orxonox/controllers/CommonController.cc

    r10797 r10798  
    139139           
    140140            float angleDiff = targetAngle - myAngle;
    141             //I am looking when my angle < pi/6
     141
    142142            //if his angle is bigger than mine
    143143            if ( angleDiff > 0 )
     
    176176                else
    177177                {
    178 
     178                    //if too close
     179                    if ( diffLength < 300 )
     180                    {
     181                        this->setTargetPosition( this->getControllableEntity()->getWorldPosition() );
     182                    }
     183                    //move closer
     184                    else
     185                    {
     186                        this->setTargetPosition( this->positionOfTarget_ - 0.6f*diffVector);
     187                    }
    179188                }
    180189            }
Note: See TracChangeset for help on using the changeset viewer.