Changeset 10039 for code/branches/turretFS14/src/orxonox/controllers
- Timestamp:
 - Apr 17, 2014, 4:05:06 PM (12 years ago)
 - Location:
 - code/branches/turretFS14/src/orxonox/controllers
 - Files:
 - 
          
- 2 edited
 
- 
          ArtificialController.cc (modified) (1 diff)
 - 
          FormationController.cc (modified) (1 diff)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
        
code/branches/turretFS14/src/orxonox/controllers/ArtificialController.cc
r9667 r10039 94 94 static const float hardcoded_projectile_speed = 1250; 95 95 96 this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->get Position(), hardcoded_projectile_speed, this->target_->getPosition(), this->target_->getVelocity());96 this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getWorldPosition(), hardcoded_projectile_speed, this->target_->getWorldPosition(), this->target_->getVelocity()); 97 97 this->bHasTargetPosition_ = (this->targetPosition_ != Vector3::ZERO); 98 98  - 
        
code/branches/turretFS14/src/orxonox/controllers/FormationController.cc
r9800 r10039 277 277 } 278 278 279 Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->get Position(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);280 float distance = (target - this->getControllableEntity()->get Position()).length();279 Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->getWorldPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target); 280 float distance = (target - this->getControllableEntity()->getWorldPosition()).length(); 281 281 float rotateX = clamp(coord.x * 10, -1.0f, 1.0f); 282 282 float rotateY = clamp(coord.y * 10, -1.0f, 1.0f);  
Note: See TracChangeset
          for help on using the changeset viewer.
      


            






