- Timestamp:
- Nov 3, 2015, 2:11:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/controllers/WingmanController.cc
r10759 r10761 49 49 50 50 } 51 // void WingmanController::chooseManeuver() 52 // { 53 // if (this->maneuverType_ == ManeuverType::NONE) 54 // switch (this->maneuverType_ ) 55 // { 56 // case ManeuverType::NONE: 57 // { 58 59 // break; 60 // } 61 // case ManeuverType::NEUTRAL: 62 // { 63 64 // break; 65 // } 66 // case ManeuverType::OFFENSIVE: 67 // { 68 69 // break; 70 // } 71 // case ManeuverType::DEFENSIVE: 72 // { 73 74 // break; 75 // } 76 // } 77 // if (!this->myWingman_) 78 // return; 79 // Vector3* targetRelativePositionOfWingman; 80 // switch (this->formationMode_){ 81 // case FormationMode::WALL: 82 // { 83 // targetRelativePositionOfWingman = new Vector3 (-400, 0, 0); 84 // break; 85 // } 86 // case FormationMode::FINGER4: 87 // { 88 // targetRelativePositionOfWingman = new Vector3 (-400, 0, -200); 89 // break; 90 // } 91 // case FormationMode::VEE: 92 // { 93 // break; 94 // } 95 // case FormationMode::DIAMOND: 96 // { 97 // targetRelativePositionOfWingman = new Vector3 (400, -200, 0); 98 // break; 99 // } 100 // } 101 // Quaternion orient = this->getControllableEntity()->getWorldOrientation(); 102 103 // Vector3 targetAbsolutePositionOfWingman = ((this->getControllableEntity()->getWorldPosition()) + 104 // (this->getControllableEntity()->getWorldOrientation()* (*targetRelativePositionOfWingman))); 105 106 // myWingman_->setTargetOrientation(orient); 107 // myWingman_->setTargetPosition(targetAbsolutePositionOfWingman); 108 109 // } 51 110 52 111 void WingmanController::tick(float dt) … … 63 122 return; 64 123 //--------------------------Stay in formation-------------------------- 124 if (!this->target_) 125 { 126 //stay in formation 127 } 128 else 129 { 130 131 } 65 132 if (this->bHasTargetPosition_) 66 133 { 67 //targetPosition_ and targetOrientation_ are set by the Leader in its action()68 134 this->moveToTargetPosition(); 69 135 }
Note: See TracChangeset
for help on using the changeset viewer.