Changeset 1201 for code/branches/camera/src/orxonox/objects/SpaceShip.cc
- Timestamp:
- Apr 29, 2008, 5:15:44 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/camera/src/orxonox/objects/SpaceShip.cc
r1064 r1201 23 23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * ...25 * Benjamin Knecht 26 26 * 27 27 */ … … 38 38 #include <OgreSceneNode.h> 39 39 40 #include "CameraHandler.h" 40 41 #include "util/tinyxml/tinyxml.h" 41 42 #include "util/Convert.h" … … 282 283 void SpaceShip::setCamera(const std::string& camera) 283 284 { 284 Ogre::Camera *cam = GraphicsEngine::getSingleton().getSceneManager()->createCamera("ShipCam");285 285 this->camNode_ = this->getNode()->createChildSceneNode("CamNode"); 286 camNode_->setPosition(this->getNode()->getPosition() + Vector3(-50,0,10)); 286 287 /* 287 288 // node->setInheritOrientation(false); … … 290 291 cam->roll(Degree(0)); 291 292 */ 292 293 cam->setPosition(Vector3(-200,0,35)); 293 cam_ = new Camera(this->camNode_); 294 cam_->setTargetNode(this->getNode()); 295 CameraHandler::getInstance()->requestFocus(cam_); 294 296 // cam->setPosition(Vector3(0,-350,0)); 295 cam->lookAt(Vector3(0,0,35)); 296 cam->roll(Degree(-90)); 297 298 this->camNode_->attachObject(cam); 299 GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam); 297 //cam->roll(Degree(-90)); 298 299 //this->camNode_->attachObject(cam); 300 300 } 301 301
Note: See TracChangeset
for help on using the changeset viewer.