Changeset 1289 for code/branches/merge/src/orxonox/objects/SpaceShip.cc
- Timestamp:
- May 15, 2008, 4:43:20 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/merge/src/orxonox/objects/SpaceShip.cc
r1284 r1289 106 106 this->setConfigValues(); 107 107 108 108 109 this->setRotationAxis(1, 0, 0); 109 110 this->setStatic(false); … … 118 119 if(setMouseEventCallback_) 119 120 InputManager::removeMouseHandler("SpaceShip"); 121 if (this->cam_) 122 delete this->cam_; 120 123 } 121 124 … … 286 289 this->camNode_ = this->getNode()->createChildSceneNode(camName_); 287 290 COUT(4) << "position: (this)" << this->getNode()->getPosition() << std::endl; 288 this->camNode_->setPosition(/*this->getNode()->getPosition() +*/ Vector3(-50,0,10)); 291 this->camNode_->setPosition(Vector3(-50,0,10)); 292 Quaternion q1 = Quaternion(Radian(Degree(90)),Vector3(0,-1,0)); 293 Quaternion q2 = Quaternion(Radian(Degree(90)),Vector3(0,0,-1)); 294 camNode_->setOrientation(q1*q2); 289 295 COUT(4) << "position: (cam)" << this->camNode_->getPosition() << std::endl; 290 /*291 // node->setInheritOrientation(false);292 cam->setPosition(Vector3(0,50,-150));293 cam->lookAt(Vector3(0,20,0));294 cam->roll(Degree(0));295 *//*COUT(4) << "creating new camera" << std::endl;*/296 296 cam_ = new Camera(this->camNode_); 297 297 … … 436 436 void SpaceShip::tick(float dt) 437 437 { 438 if (this->cam_) 439 this->cam_->tick(dt); 440 438 441 if (this->redNode_ && this->greenNode_) 439 442 {
Note: See TracChangeset
for help on using the changeset viewer.