Changeset 10798
- Timestamp:
- Nov 12, 2015, 11:31:46 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/controllers/CommonController.cc
r10797 r10798 139 139 140 140 float angleDiff = targetAngle - myAngle; 141 //I am looking when my angle < pi/6 141 142 142 //if his angle is bigger than mine 143 143 if ( angleDiff > 0 ) … … 176 176 else 177 177 { 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 } 179 188 } 180 189 }
Note: See TracChangeset
for help on using the changeset viewer.