Changeset 1407 for code/trunk/src/orxonox/objects/SpaceShip.cc
- Timestamp:
- May 24, 2008, 1:49:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/SpaceShip.cc
r1401 r1407 69 69 return NULL; 70 70 } 71 71 72 72 SpaceShip::SpaceShip() : 73 73 //testvector_(0,0,0), … … 112 112 this->setConfigValues(); 113 113 114 initialDir_ = Vector3(1.0, 0.0, 0.0);115 currentDir_ = initialDir_;116 initialOrth_ = Vector3(0.0, 0.0, 1.0);117 currentOrth_ = initialOrth_;118 114 119 115 this->setRotationAxis(1, 0, 0); … … 241 237 CameraHandler::getInstance()->requestFocus(cam_); 242 238 243 }244 245 Camera* SpaceShip::getCamera(){246 return cam_;247 239 } 248 240 … … 399 391 } 400 392 401 Vector3 SpaceShip::get Dir() {402 return currentDir_;403 } 404 405 Vector3 SpaceShip::getOrth(){406 return currentOrth_;393 Vector3 SpaceShip::getSPosition() { 394 return SpaceShip::getLocalShip()->getPosition(); 395 } 396 397 Quaternion SpaceShip::getSOrientation() { 398 return SpaceShip::getLocalShip()->getOrientation(); 407 399 } 408 400 … … 411 403 void SpaceShip::tick(float dt) 412 404 { 413 currentDir_ = getOrientation()*initialDir_;414 currentOrth_ = getOrientation()*initialOrth_;415 416 405 if (this->cam_) 417 406 this->cam_->tick(dt); … … 433 422 if (this->bLMousePressed_ && this->timeToReload_ <= 0) 434 423 { 435 424 436 425 Projectile *p = new Projectile(this); 437 426 438 427 p->setBacksync(true); 439 428 this->timeToReload_ = this->reloadTime_;
Note: See TracChangeset
for help on using the changeset viewer.