Changeset 1212 for code/branches/network3/src/orxonox/objects/SpaceShip.cc
- Timestamp:
- May 1, 2008, 6:09:54 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network3/src/orxonox/objects/SpaceShip.cc
r1184 r1212 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" … … 287 288 288 289 void SpaceShip::createCamera(){ 289 Ogre::Camera *cam = GraphicsEngine::getSingleton().getSceneManager()->createCamera("ShipCam");290 290 this->camNode_ = this->getNode()->createChildSceneNode("CamNode"); 291 camNode_->setPosition(this->getNode()->getPosition() + Vector3(-50,0,10)); 291 292 /* 292 293 // node->setInheritOrientation(false); … … 295 296 cam->roll(Degree(0)); 296 297 */ 297 298 cam->setPosition(Vector3(-200,0,35)); 298 cam_ = new Camera(this->camNode_); 299 cam_->setTargetNode(this->getNode()); 300 CameraHandler::getInstance()->requestFocus(cam_); 299 301 // cam->setPosition(Vector3(0,-350,0)); 300 cam->lookAt(Vector3(0,0,35)); 301 cam->roll(Degree(-90)); 302 303 this->camNode_->attachObject(cam); 304 GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam); 302 //cam->roll(Degree(-90)); 303 304 //this->camNode_->attachObject(cam); 305 305 306 306 }
Note: See TracChangeset
for help on using the changeset viewer.