Changeset 1287 for code/branches/camera/src/orxonox/objects/SpaceShip.cc
- Timestamp:
- May 15, 2008, 3:54:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/camera/src/orxonox/objects/SpaceShip.cc
r1235 r1287 79 79 80 80 this->camNode_ = 0; 81 this->cam_ = NULL; 81 82 82 83 this->tt_ = 0; … … 148 149 if (this->tt_) 149 150 delete this->tt_; 151 if (this->cam_) 152 delete this->cam_; 150 153 } 151 154 … … 284 287 { 285 288 this->camNode_ = this->getNode()->createChildSceneNode("CamNode"); 286 camNode_->setPosition(Vector3(-50,0,10)); 289 camNode_->setPosition(Vector3(-30,0,10)); 290 Quaternion q1 = Quaternion(Radian(Degree(90)),Vector3(0,-1,0)); 291 Quaternion q2 = Quaternion(Radian(Degree(90)),Vector3(0,0,-1)); 292 camNode_->setOrientation(q1*q2); 293 //this->camNode_->showBoundingBox(true); 294 287 295 /* 288 296 // node->setInheritOrientation(false); … … 292 300 */ 293 301 cam_ = new Camera(this->camNode_); 294 cam_->setTargetNode(this-> getNode());302 cam_->setTargetNode(this->chFarNode_); 295 303 CameraHandler::getInstance()->requestFocus(cam_); 296 304 // cam->setPosition(Vector3(0,-350,0)); … … 427 435 428 436 void SpaceShip::tick(float dt) 429 { 437 {/* 438 if (this->cam_) 439 this->cam_->update(); 440 */ 441 if (this->cam_) 442 this->cam_->tick(dt); 443 430 444 if (InputManager::getSingleton().getMouse()->getEventCallback() != this) 431 445 {
Note: See TracChangeset
for help on using the changeset viewer.